Add getOutputDims to 2d layers

This commit is contained in:
2024-05-26 14:28:43 +02:00
parent 78a0fd0baf
commit cba177e417
9 changed files with 37 additions and 4 deletions

View File

@@ -128,6 +128,10 @@ int BatchNorm2d::getOutputSize() {
return inputSize.first * inputSize.second * inputChannels;
}
dim2d BatchNorm2d::getOutputDims() {
return inputSize;
}
float *BatchNorm2d::forward(const float *d_input) {
// Compute per-channel batch normalization
for (int i = 0; i < inputChannels; i++) {