oreilly-japan / deep-learning-from-scratch

『ゼロから作る Deep Learning』(O'Reilly Japan, 2016)
MIT License
3.99k stars 3.34k forks source link

Question on Chapter 7.4.4 pooling layger output reshape #70

Open Hustwireless opened 1 year ago

Hustwireless commented 1 year ago

I've got a question on the following line of code. According to the illustration of the book, I think this line

https://github.com/oreilly-japan/deep-learning-from-scratch/blob/cb755e9549f858e9804b5f03e41fa24ee7f8345a/common/layers.py#L266

perhaps should be

out = out.reshape(N, C, out_h, out_w)

because the tensor here seems to have a different struture from the convolution computation. However, I'm not quite sure about this, please do not hesitate to correct me if I'm wrong.

Thanks in advance!