Пример #1
0
 public Sequence(IReadOnlyList <IGraphData> data, IMiniBatch miniBatch, MiniBatchSequenceType sequenceType, int sequenceIndex)
 {
     _data          = data;
     _miniBatch     = miniBatch;
     _sequenceType  = sequenceType;
     _sequenceIndex = sequenceIndex;
 }
Пример #2
0
 public Sequence(IReadOnlyList <IGraphData> data, IMiniBatch miniBatch, MiniBatchSequenceType sequenceType, int sequenceIndex)
 {
     Input         = data;
     MiniBatch     = miniBatch;
     Type          = sequenceType;
     SequenceIndex = sequenceIndex;
 }
Пример #3
0
        protected bool _Continue(IMiniBatch batch, IExecutionContext executionContext, Func <IMiniBatchSequence, IContext> lookupContext)
        {
            var ret = false;

            while (executionContext.HasContinuations)
            {
                batch.Reset();
                IMiniBatchSequence curr = null;
                while ((curr = batch.GetNextSequence()) != null)
                {
                    var context = lookupContext(curr);
                    executionContext.Continue(context);
                    while (context.HasNext)
                    {
                        context.ExecuteNext();
                    }
                }
                ret = true;
            }
            return(ret);
        }
Пример #4
0
 protected abstract void _Execute(IExecutionContext context, IMiniBatch miniBatch);