internal override Vector <double> Process(Vector <double> input) { InputCache = input; for (var i = 0; i < OutputHeight; i++) { for (var j = 0; j < OutputWidth; j++) { for (var inputFrame = 0; inputFrame < InputDepth; inputFrame++) { for (var f = 0; f < NFilters; f++) { // (inputFrame * NFilters + f) = the output frame // OutputHeight * OutputWidth = Number of pixels per frame int outputIndex = (inputFrame * NFilters + f) * OutputHeight * OutputWidth + i * OutputWidth + j; DirectInputCache[outputIndex] = ApplyFilter(input, inputFrame, f, i * Stride, j * Stride); } } } } return(10 * (ActFunc.Of(DirectInputCache) - 0.5)); // DEBUG 10* }
internal override Vector <double> Process(Vector <double> input) { InputCache = input; return(ActFunc.Of(input * Weights)); }