Skip to content

Commit

Permalink
more cnn debug (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio Jerez committed Oct 31, 2023
1 parent 6c161b9 commit e053ae2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions newton-4.00/sdk/dBrain/ndBrainLayerConvolutional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ ndBrainLayerConvolutional::ndBrainLayerConvolutional(ndInt32 inputWidth, ndInt32

//if (inputWidth == 5)
if (inputWidth == 12)
Debug(inputWidth, m_inputHeight, inputDepth, kernelSize, numberOfKernels);
{
//Debug(inputWidth, m_inputHeight, inputDepth, kernelSize, numberOfKernels);
Debug(7, 7, 2, 3, 3);
}
}

ndBrainLayerConvolutional::ndBrainLayerConvolutional(const ndBrainLayerConvolutional& src)
Expand Down Expand Up @@ -360,7 +363,7 @@ void ndBrainLayerConvolutional::Debug(ndInt32 width, ndInt32 height, ndInt32 cha
ndTrace((" "));
for (ndInt32 x = 0; x < filterSize; ++x)
{
ndTrace(("x(%d,%d,%d)*w(%d,%d,%d,%d) + ", channel, y0 + y, x0 + x, filter, channel, y, x));
ndTrace(("x(%d,%d,%d) * w(%d,%d,%d,%d) + ", channel, y0 + y, x0 + x, filter, channel, y, x));
}
ndTrace(("\n"));
}
Expand All @@ -381,10 +384,8 @@ void ndBrainLayerConvolutional::Debug(ndInt32 width, ndInt32 height, ndInt32 cha
{
for (ndInt32 x0 = 0; x0 < filterSize; ++x0)
{
ndTrace(("dL/dw(%d,%d,%d,%d)=\n", filter, channel, y0, x0));


ndTrace(("\n"));
//ndTrace(("dL/dw(%d,%d,%d,%d)=\n", filter, channel, y0, x0));
//ndTrace(("\n"));
}
}
}
Expand Down

0 comments on commit e053ae2

Please sign in to comment.