| 48 | REGISTER_GRADIENT_OP("Softmax", SoftmaxGrad); |
| 49 | |
| 50 | bool IsZero(const Scope& scope, const Output& grad) { |
| 51 | string op_type_name = grad.op().node()->type_string(); |
| 52 | if (op_type_name == "ZerosLike" || op_type_name == "Zeros") { |
| 53 | return true; |
| 54 | } |
| 55 | // The Operation we were provided is not named something obvious so |
| 56 | // we need to actually look at its contents. |
| 57 | // The original python code did this by calling a utility function called |
| 58 | // tensor_util.constant_value. |
| 59 | // There is no C++ equivalent to tensor_util.constant_value so we do nothing |
| 60 | // for the moment. |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | // Multiply after broadcasting vec to match dimensions of mat. |
| 65 | // Args: |
no test coverage detected