System.Collections.Generic.List.Add((BrightWire.Models.FloatMatrix Input, BrightWire.Models.FloatMatrix Output))

Here are the examples of the csharp api class System.Collections.Generic.List.Add((BrightWire.Models.FloatMatrix Input, BrightWire.Models.FloatMatrix Output)) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

View license
(IMatrix, IReadOnlyList<IRow>) _Encode(IExecutionContext executionContext, IReadOnlyList<int> rows)
        {
            var data = _GetRows(rows);

            // create the input batch
            var inputData = new List<(FloatMatrix Input, FloatMatrix Output)>();
            foreach (var row in data)
                inputData.Add(((FloatMatrix)row.Data[0], null));
            var encoderInput = _GetSequentialMiniBatch(rows, inputData);

            // execute the encoder
            IMiniBatchSequence sequence;
            IMatrix encoderOutput = null;
            while ((sequence = encoderInput.GetNextSequence()) != null) {
                using (var context = _Process(executionContext, sequence)) {
                    if (sequence.Type == MiniBatchSequenceType.SequenceEnd)
                        encoderOutput = context.Data.GetMatrix();
                }
            }
            return (encoderOutput, data);
        }