Custom Layer in Keras for idct

前端 未结 1 1297
既然无缘
既然无缘 2021-01-27 02:20

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

相关标签:
1条回答
  • 2021-01-27 03:23

    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.

    0 讨论(0)
提交回复
热议问题