class_docstr: Test functions defined in `functional` module
class_docstr_tok: ["Test","functions","defined","in","`","functional","`","module"]
code: def test_amplitude_to_DB(self, top_db):
      spec = torch.rand(self.batch_size, 2, 100, 100) * 200
  
      amplitude_mult = 20.0
      amin = 1e-10
      ref = 1.0
      db_mult = math.log10(max(amin, ref))
      kwargs = {
          "multiplier": amplitude_mult,
          "amin": amin,
          "db_multiplier": db_mult,
          "top_db": top_db,
      }
      func = partial(F.amplitude_to_DB, **kwargs)
      # Test with & without a `top_db` clamp
      self.assert_batch_consistency(func, inputs=(spec,))
  
imports: import itertools
  import math
  from functools import partial
  import torch
  import torchaudio.functional
  from parameterized import parameterized, parameterized_class
  from torchaudio_unittest import common_utils
label_desc: Use image node_id 4 for calling the TestFunctional obj's underlying member method code with example usage: obj.test_amplitude_to_DB(top_db) without return types