oneflow/api/python/autograd/autograd.cpp
Maybe<one::TensorTuple> CheckAndInitOutGrads(const one::TensorTuple& outputs,
                                             const one::TensorTuple& out_grads) {
  auto gradients = std::make_shared<one::TensorTuple>(out_grads.size());
  TODO();  // Wang Yinggang. Checks all out_grads and push default value for empty item
  return gradients;
}
// Checks and sets default value for initial gradients based on out_grads
// If output is the tensor whose size is greater than 1, out_grad's shape must be same as output's.
// If output is a scaler tensor, out_grad will also be a scaler or empty(will be inited to
// `flow.ones([1])`).
Checks and sets default value for initial gradients based on out_grads
If output is the tensor whose size is greater than 1, out_grad's shape must be same as output's.
If output is a scaler tensor, out_grad will also be a scaler or empty(will be inited to
`flow.ones([1])`).
Checks and sets default value for initial gradients based on out_grads If output is the tensor whose size is greater than 1 out_grad ' s shape must be same as output ' s . If output is a scaler tensor out_grad will also be a scaler or empty ( will be inited to ` flow . ones ( [ 1 ] ) ` ) .
Maybe<one::TensorTuple> CheckAndInitOutGrads(const one::TensorTuple& outputs,
                                             const one::TensorTuple& out_grads) {
  auto gradients = std::make_shared<one::TensorTuple>(out_grads.size());
  TODO();  
  return gradients;
}
Maybe < one :: TensorTuple > CheckAndInitOutGrads ( const one :: TensorTuple & outputs , const one :: TensorTuple & out_grads ) { auto gradients = std :: make_shared < one :: TensorTuple > ( out_grads . size ( ) ) ; TODO ( ) ; return gradients ; }
Checks and sets default value for initial gradients based on out_grads
If output is the tensor whose size is greater than 1, out_grad's shape must be same as output's.
Checks and sets default value for initial gradients based on out_grads If output is the tensor whose size is greater than 1 out_grad ' s shape must be same as output ' s .
// Wang Yinggang. Checks all out_grads and push default value for empty item