Conjugate helper function returns the conjugate of an Output if it is complex valued.
| 45 | // Conjugate helper function returns the conjugate of an Output if it |
| 46 | // is complex valued. |
| 47 | Output ConjugateHelper(const Scope& scope, const Output& out) { |
| 48 | DataType dtype = out.type(); |
| 49 | if (dtype == DT_COMPLEX64 || dtype == DT_COMPLEX128) { |
| 50 | return Conj(scope, out); |
| 51 | } else { |
| 52 | return out; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // TODO(andydavis) Add control dependencies to gradient functions (as needed). |
| 57 |
no test coverage detected