cs231n icon indicating copy to clipboard operation
cs231n copied to clipboard

fix: spatial_groupnorm_forward output shape

Open Walt-H opened this issue 5 years ago • 0 comments

I wanted to first thank you for posting your assignment solutions. They have been a HUGE help in my deep learning journey :)

Though your means and variances were perfect, there was a big difference in input and output shape, which should've been the same.

Before spatial group normalization:
  Shape:  (2, 6, 4, 5)
...
After spatial group normalization:
  Shape:  (1, 1, 1, 2, 6, 4, 5)

This single commit gets the shaping just right:

Before spatial group normalization:
  Shape:  (2, 6, 4, 5)
...
After spatial group normalization:
  Shape:  (2, 6, 4, 5)

You may also notice that I used np.mean and np.var. I did this to not complicate the code, since we take the mean, and compute the variance, on a few dimensions.

Thank you again for all your hard work!

Walt-H avatar Sep 24 '19 14:09 Walt-H