| 107 | } |
| 108 | |
| 109 | Tensor SymCastGrad(const Tensor& x, const DataType dst) { |
| 110 | Tensor ret; |
| 111 | const FDH::Node op_node = { |
| 112 | {"y"}, "Cast", {"x"}, {{"SrcT", x.dtype()}, {"DstT", dst}}}; |
| 113 | TF_CHECK_OK(Unary(op_node, x, dst, &ret)); |
| 114 | return ret; |
| 115 | } |
| 116 | |
| 117 | // Binary |
| 118 | void SymGrad(const string& op, const Tensor& x, const Tensor& y, Tensor* dx, |