I'm finding it impossible to create a NetDecoder to function as the inverse equivalent of, e.g., NetEncoder["AudioSTFT"], NetEncoder["AudioSpectrogram"], etc.

The documentation states:

NetDecoder[NetEncoder[[...]]] will create a decoder based on the parameters of an existing encoder.

But every variation of this formula I've tried has resulted only in $Failed

I've also tried to come up with a solution using the "Function" named decoder option, e.g., NetDecoder[{"Function", InverseSpectrogram[#] &}], but whether it's because functions like ShortTimeFourier[] and InverseShortTimeFourier[] involve "data objects" incompatible with their NetEncoder equivalents or some other misunderstanding of mine about how the named "Function" decoder is supposed to work, I just can't seem to figure out how to create NetDecoders that do what I need.

If someone could help me out here, or point me toward any resources/examples where Mathematica/WLNet and its various Audio encoders are used to create something besides a classifier, I'd really appreciate it. Thanks.

  • $\begingroup$ It would be helpful if you could include examples of the exact complete syntax you have tried so far. $\endgroup$
    – MarcoB
    Dec 6 '19 at 14:14
  • $\begingroup$ Sorry, I supposed "every variation" covered it, but, for example: NetDecoder[NetEncoder["AudioSTFT"]], enc = NetEncoder["AudioSTFT"]; NetDecoder[enc], dec = NetDecoder[{"Function", InverseSpectrogram[#] &}], dec = NetDecoder[{"Function", InverseShortTimeFourier[#] &}] (when fed `enc=NetEncoder["AudioSTFT"] yields Expecting a ShortTimeFourierData object or a numeric matrix instead of Numeric Array, etc. $\endgroup$
    – agibilium
    Dec 6 '19 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.