Python Forum
Error in computing FFT operation
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in computing FFT operation
#1
Python 3.5
Tensorflow GPU

Hello, 
I am trying to perform a fft operation on a variable
x = tf.Variable([1,2,3,4,5],df.type =tf.float32)
y = tf.fft(x)
sess=tf.Session()
sess.run(model)
print(sess.run(d))
and it gives an error  
TypeError: Input 'input' of 'FFT' Op has type float32 that does not match expected type of complex64
So i tried converting the variable to complex number and it shows another error. 
a = tf.Variable ([1,2,3,4,5],dtype=tf.float32)
b= tf.Variable([0,0,0,0,0],dtype =tf.float32)
c = tf.complex(a,b)
d = tf.fft(c
model = init_all_variables()
sess = tf.Session()
sess.run(model)
print(sess.run(c))
InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'FFT' with these attrs.  Registered kernels:
  <no registered kernels>

[[Node: FFT = FFT[](Complex)]]
Please help me to resolve the issue
Reply
#2
Hello,
Your question/issue is specific to Tensorflow. So unless someone here is familiar with TensorFlow, then it's unlikely you will find an answer on this forum. Asking on TF Google Group was a better idea, so I hope guys there can help you out.
That said, I don't know how TF handles FFT input data, but FFT routines usually expect a "vector/array/list..." whose length is a power of two. Have you tried that out?
Good luck! JC
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cloud computing advice needed sawtooth500 2 91 Yesterday, 10:48 PM
Last Post: sawtooth500
  Computing the distance between each pair of points Truman 11 4,176 Jun-20-2020, 01:15 PM
Last Post: Truman
  Converting days to years in loop while computing values across grid cells Lightning1800 2 2,628 May-15-2018, 08:44 PM
Last Post: Lightning1800

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020