Paddle
Paddle copied to clipboard
Can we set default dimension for gradient tensor?
-
In most case, the dimension of one tensor's gradient should be consistent with the tensor itself. If it is not, we can resize it explicitly.
-
It would bring convience in operators' implementing. Take reshape_op for example, if the dimension of
d_inhas been known in advance, there is no need to write a gradient compute kernel, but can use forward op withNetOpinstead.