Esempio n. 1
0
        public void TestTrainingClockworkGradient()
        {
            LSTMSimpleLayerTest test = new LSTMSimpleLayerTest(m_log, m_evtCancel, m_strParams);

            try
            {
                if (m_bDisableDouble)
                {
                    test.Tests[0].Enabled = false;
                }

                if (m_bDisableFloat)
                {
                    test.Tests[1].Enabled = false;
                }

                foreach (ILSTMSimpleLayerTest t in test.EnabledTests)
                {
                    Stopwatch sw = new Stopwatch();

                    sw.Start();
                    t.TestTraining(960, 23, 1, m_bShortModel);
                    sw.Stop();

                    if (m_log != null)
                    {
                        m_log.WriteLine("Test Completed - Training<" + t.DataType.ToString() + "> - " + sw.Elapsed.TotalMilliseconds.ToString("N5") + " ms.");
                    }
                }
            }
            finally
            {
                test.Dispose();
            }
        }
Esempio n. 2
0
        public void TestGradientBatchClipMask()
        {
            LSTMSimpleLayerTest test = new LSTMSimpleLayerTest(m_log, m_evtCancel);

            try
            {
                foreach (ILSTMSimpleLayerTest t in test.Tests)
                {
                    Stopwatch sw = new Stopwatch();

                    sw.Start();
                    t.TestGradientBatchClipMask();
                    sw.Stop();

                    if (m_log != null)
                    {
                        m_log.WriteLine("Testing GradientBatchClipMask<" + t.DataType.ToString() + "> - " + sw.Elapsed.TotalMilliseconds.ToString("N5") + " ms.");
                    }
                }
            }
            finally
            {
                test.Dispose();
            }
        }
Esempio n. 3
0
        public void TestGradientDefault()
        {
            LSTMSimpleLayerTest test = new LSTMSimpleLayerTest(m_log, m_evtCancel);

            try
            {
                foreach (ILSTMSimpleLayerTest t in test.Tests)
                {
                    t.TestGradientDefault();
                }
            }
            finally
            {
                test.Dispose();
            }
        }
Esempio n. 4
0
        public void TestSetup()
        {
            LSTMSimpleLayerTest test = new LSTMSimpleLayerTest(m_log, m_evtCancel);

            try
            {
                foreach (ILSTMSimpleLayerTest t in test.EnabledTests)
                {
                    t.TestSetup();
                }
            }
            finally
            {
                test.Dispose();
            }
        }