I am getting below error
TypeError: ‘numpy.float64’ object does not support item assignment
{moderator edit - solution code removed}
I am getting below error
TypeError: ‘numpy.float64’ object does not support item assignment
{moderator edit - solution code removed}
There are a number of errors in your code, but I’m not sure which one would cause that specific error to be thrown.
You are not initializing Z. The commented line there is not the correct syntax to accomplish that. Actually that may be what causes the error.
But the bigger issues are that the stride value is mentioned nowhere in your loops in conv_forward. Also the ranges on the for loops for h and w should not be for the input space, right? The loops here are all over the output space and you must touch each point in the output space. Then the question is computing where the stride puts you in the input space.
I suggest you try fixing that set of issues first and then if you still get the float64 error, please show us the full exception trace. That should point to the specific line that is throwing.