0

My intention is to use pywavelet on a tensor in tensorflow, with the sentence

pywt.dwt(input,'db1')

The error was

Cannot convert DType to numpy.dtype

Input is a Tensor("Reshape_18:0", shape=(?, 28, 28, 1), dtype=float32) from MNIST dataset.

I try with the sentence pywt.dwt(input.dtype.as_numpy_dtype,'db1') and the error "invalid array_struct".

Bsquare ℬℬ
  • 4,423
  • 11
  • 24
  • 44
Mari Ar
  • 1
  • 1

1 Answers1

0

pywt.dwt() takes a 1D array.

But looks like you have a 4D array so you'll wanna use a pywt.dwtn() Docs here.

Maaz Basar
  • 13
  • 3