Q1: what is the purpose of gradient argument?
gradient will perform a dot product on out, right?
what is the objective of this operation?
Q2:  Why gradient argument is required for tensor outputs?
Can we use the following backward, which not specify the gradient argument?
out.backward()

It will cause the following error

“grad can be implicitly created only for scalar outputs”

Why is the gradient argument required in tensor outputs? We can set a tensor of ones as the default value of gradient.