Skip to content

Commit

Permalink
Use a stronger threshold in tensorflowpredictmaest
Browse files Browse the repository at this point in the history
This was achieves by making sure that the input melspectrogram was
computed exactly in the same way in TensorflowPredictMAEST and the
original pytorch implementation, using MonoLoader with
resampleQuality=1.

While using resampleQuality=4 has a numerical impact in the results, it
is not enough to change the prediction ranking according to informal
observations (could not be the same in corner cases).
  • Loading branch information
palonso committed Oct 20, 2023
1 parent 53148b2 commit 6b043f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def testRegression(self):
)

filename = join(testdata.audio_dir, "recorded", "techno_loop.wav")
audio = MonoLoader(filename=filename, sampleRate=16000, resampleQuality=4)()
audio = MonoLoader(filename=filename, sampleRate=16000)()

activations = self.model30s(audio)
found = numpy.mean(activations, axis=0).squeeze()

self.assertAlmostEqualVector(found, expected, 1e-1)
self.assertAlmostEqualVector(found, expected, 1e-3)

def testInvalidParam(self):
self.assertConfigureFails(
Expand Down

0 comments on commit 6b043f1

Please sign in to comment.