I’m wondering a bit about the dimensions of the tensors that PyTorch wants when implementing the forward() and backward() steps for a custom function. Basically the function would have the signature f(x,y) = z, where x is an n-vector, y an m-vector and z a k-vector.
Now backward() gets a vector grad_input back. This should be k-dimensional? Is it batched? What should be the dimensions of the pair of tensors I should return?
The current documentation seems to document everything except the dimensions and since the example is quite simple, it doesn’t showcase this.