NotImplementedError: Exception encountered when calling layer "activation_3" (type Activation).
Cannot convert a symbolic tf.Tensor (Placeholder:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported.
Call arguments received by layer "activation_3" (type Activation):
• inputs=tf.Tensor(shape=(None, 512), dtype=float32)
因此,我找到了一个解决方案,即改变音频数据的形状,以便它适合DWT神经层,但是我仍然对输出的形状有问题。就像我之前说过的那样,这个张量的小波套件显然应该处理图像,而不是信号。 另一个解决方案是更改小波 - 浓度量代码,以便将其应用于信号。对我来说,它无效,导致其他错误,例如“ attributeError:'张量”对象没有属性'numpy'”,即使我尝试了eagrly模式和图形模式,但没有任何帮助。 如果有人找到了另一种解决方案,请随时发表评论,以便其他人可以使用您的解决方案。
第一个实现是针对正确的图像 可能会有所帮助的DWT1D和IDWT1D的实现 https://github.com/Timorleiderman/tensorflow-wavelets/blob/642335ad5473531fb06ca11b921f9b8c99a1b144/src/tensorflow_wavelets/Layers/DWT.py#L201C7-L201C12