Skip to content

Commit

Permalink
Switched YAMNet to stick with Keras 2.
Browse files Browse the repository at this point in the history
TF 2.16 switched the default to Keras 3 which is backwards incompatible.
  • Loading branch information
Manoj Plakal committed Sep 23, 2024
1 parent 951c619 commit 817ed0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion research/audioset/yamnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ YAMNet depends on the following Python packages:
* [`numpy`](http://www.numpy.org/)
* [`resampy`](http://resampy.readthedocs.io/en/latest/)
* [`tensorflow`](http://www.tensorflow.org/)
* [`tf_keras`](https://github.com/keras-team/tf-keras)
* [`pysoundfile`](https://pysoundfile.readthedocs.io/)

These are all easily installable via, e.g., `pip install numpy` (as in the
example command sequence below). Any reasonably recent version of these
packages should work.
packages should work. Note that YAMNet currently relies on Keras 2 and is
incompatible with Keras 3 (the default as of TF 2.16).

YAMNet also requires downloading the following data file:

Expand Down
2 changes: 1 addition & 1 deletion research/audioset/yamnet/yamnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy as np
import tensorflow as tf
from tensorflow.keras import Model, layers
from tf_keras import Model, layers

import features as features_lib

Expand Down

0 comments on commit 817ed0b

Please sign in to comment.