I am trying to write a custom layer in Keras for IDCT (Inverse Discrete Cosine Transform) as there is no built-in function in Keras for IDCT as compared to DCT. So when I write
You are running an operation which expects a NumPy ndarray
on tensors. Unfortunately this will not work. You need to reimplement the custom operation using only tensor operators.
Having said that, using functions from Tensorflow directly is OK as well, say from import tensorflow
and use those inside a custom layer might give you more functions than Keras backend alone.