Beispiel #1
0
        public IMatrix ExecuteToMatrix(I3DTensor tensor)
        {
            IMatrix input;

            if (_padding > 0)
            {
                using (var padded = tensor.AddPadding(_padding))
                    input = padded.Im2Col(_filterWidth, _filterHeight, _stride);
            }
            else
            {
                input = tensor.Im2Col(_filterWidth, _filterHeight, _stride);
            }

            // execute the layer
            var ret = _layer.Activate(input);

            input.Dispose();
            return(ret);
        }
Beispiel #2
0
 public void Activate(List <IDisposableMatrixExecutionLine> curr)
 {
     _layer.Activate(curr[0]);
 }