class_docstr: Test the ImperceptibleASR attack.
class_docstr_tok: ["Test","the","ImperceptibleASR","attack","."]
code: def test_approximate_power_spectral_density_tf(
      self, art_warning, asr_dummy_estimator, audio_batch_padded
  ):
      try:
          import tensorflow.compat.v1 as tf1
  
          tf1.reset_default_graph()
  
          test_delta = audio_batch_padded
          test_psd_maximum = np.ones((test_delta.shape[0]))
  
          masker = PsychoacousticMasker()
          imperceptible_asr = ImperceptibleASR(
              estimator=asr_dummy_estimator(), masker=masker
          )
          feed_dict = {
              imperceptible_asr._delta: test_delta,
              imperceptible_asr._power_spectral_density_maximum_tf: test_psd_maximum,
          }
  
          approximate_psd_tf = (
              imperceptible_asr._approximate_power_spectral_density_tf(
                  imperceptible_asr._delta,
                  imperceptible_asr._power_spectral_density_maximum_tf,
              )
          )
          with tf1.Session() as sess:
              psd_approximated = sess.run(approximate_psd_tf, feed_dict)
  
          assert psd_approximated.ndim == 3
          assert (
              psd_approximated.shape[0] == test_delta.shape[0]
          )  # batch_size
          assert (
              psd_approximated.shape[1] == masker.window_size // 2 + 1
          )
      except ARTTestException as e:
          art_warning(e)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.imperceptible_asr.imperceptible_asr import ImperceptibleASR, PsychoacousticMasker
  from tests.utils import ARTTestException
label_desc: Use image node_id 10 for calling the TestImperceptibleASR obj's underlying member method code with example usage: obj.test_approximate_power_spectral_density_tf(art_warning, asr_dummy_estimator, audio_batch_padded) without return types