コード例 #1
0
 /// <summary>
 /// Constructor for initializing _storage and other indices.
 /// </summary>
 /// <param name="trainer"></param>
 /// <param name="ch"></param>
 public ArrayManager(SymSgdClassificationTrainer trainer, IChannel ch)
 {
     _storage = new List <VeryLongArray>();
     // Setting the default value to 2^17.
     _veryLongArrayLength = (1 << 17);
     _indexInCurArray     = 0;
     _storageIndex        = 0;
     _trainer             = trainer;
     _ch      = ch;
     _sizeofT = Marshal.SizeOf(typeof(T));
 }
コード例 #2
0
            public InputDataManager(SymSgdClassificationTrainer trainer, FloatLabelCursor.Factory cursorFactory, IChannel ch)
            {
                _instIndices        = new ArrayManager <int>(trainer, ch);
                _instValues         = new ArrayManager <float>(trainer, ch);
                _instanceProperties = new List <InstanceProperties>();

                _cursorFactory  = cursorFactory;
                _ch             = ch;
                _cursor         = cursorFactory.Create();
                _cursorMoveNext = _cursor.MoveNext();
                _isFullyLoaded  = true;

                _instanceIndex = 0;

                _trainer = trainer;
            }