Could you post the type and shape of x as well as the input argument shape, so that we could debug this issue?
This error points towards the complex types so are you using this tensor type or might the error message be misleading?