Customer Layers

http://d2l.ai/chapter_deep-learning-computation/custom-layer.html

Not a big deal but MyLinear should be named as MyDense in pytorch example for concordance with the text.

In 5.4.2 pytorch code of first chunk, we should use ‘self.weight’ and ‘self.bias’ rather than ‘self.weight.data’ and ‘self.bias.data’ if we want gradients existed for BP

I could not understand the meaning of the formula

y_k = \sum_{i, j} W_{ijk} x_i x_j

which computes a tensor reduction.
I don’t know the shape of the inputs and output.