diff --git a/research/audioset/yamnet/README.md b/research/audioset/yamnet/README.md index 4f3caddfd0f..e57b84339d2 100644 --- a/research/audioset/yamnet/README.md +++ b/research/audioset/yamnet/README.md @@ -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: diff --git a/research/audioset/yamnet/yamnet.py b/research/audioset/yamnet/yamnet.py index cac7f87d99e..06a246b043b 100644 --- a/research/audioset/yamnet/yamnet.py +++ b/research/audioset/yamnet/yamnet.py @@ -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