I tried to compute the gradient d/dx(Exp[jx]) by doing something like:
def expi(x):
return tf.complex(tf.cos(x), tf.sin(x)) # cosx + isinx
x = tf.Varia