vggish TF2 compatibility

100 views
Skip to first unread message

Gonçalo CB

unread,
Feb 18, 2020, 2:49:58 PM2/18/20
to audioset-users
VGGish is not compatible with the newest version of Tensorflow.

What should i do ? will you release a compatible version soon? should i start using yamnet ? or just use older versions of Tensorflow?

Thank you !

Manoj Plakal

unread,
Feb 18, 2020, 3:00:32 PM2/18/20
to Gonçalo CB, audioset-users

VGGish and YAMNet both use TF1 APIs but are compatible with TF2 in the sense that you can still run them with a TF2 installation. It's just that both the models will disable TF2 behavior and use the tensorflow.compat.v1 compatibility APIs. So you should be able to use them to some degree. You just won't be able to combine the use of VGGish or YAMNet with other TF2 code of yours in the same program.

We don't have a timeline for updating the models for TF2 yet.



--
You received this message because you are subscribed to the Google Groups "audioset-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audioset-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/audioset-users/7e99c8b5-f484-4650-92bd-855ef38ee149%40googlegroups.com.

Manoj Plakal

unread,
Feb 18, 2020, 3:02:49 PM2/18/20
to Gonçalo CB, audioset-users

Slight correction, YAMNet does not use the TF1 compatibility API and should already be TF2 compatible through its use of tf.keras.layers.*. So if you need to mix our models with your TF2 code in the same program, YAMNet is the only option.

Roberta Rocca

unread,
Feb 18, 2020, 3:08:05 PM2/18/20
to audioset-users
related question. I'm running the YAMNet tutorial notebook using TF 2.0, and model.predict triggers an error (output shape (40,512) not matching expected output shape (1,512)).
My guess is that this has to do with tf 2 handling batching in a different way. 
Any suggestions on how to handle this (without using predict_on_batch, which would not be sustainable on large files)?


Il giorno martedì 18 febbraio 2020 14:02:49 UTC-6, Manoj Plakal ha scritto:

Slight correction, YAMNet does not use the TF1 compatibility API and should already be TF2 compatible through its use of tf.keras.layers.*. So if you need to mix our models with your TF2 code in the same program, YAMNet is the only option.


On Tue, Feb 18, 2020 at 3:00 PM Manoj Plakal <pla...@google.com> wrote:

VGGish and YAMNet both use TF1 APIs but are compatible with TF2 in the sense that you can still run them with a TF2 installation. It's just that both the models will disable TF2 behavior and use the tensorflow.compat.v1 compatibility APIs. So you should be able to use them to some degree. You just won't be able to combine the use of VGGish or YAMNet with other TF2 code of yours in the same program.

We don't have a timeline for updating the models for TF2 yet.



On Tue, Feb 18, 2020 at 2:50 PM Gonçalo CB <goncalo...@gmail.com> wrote:
VGGish is not compatible with the newest version of Tensorflow.

What should i do ? will you release a compatible version soon? should i start using yamnet ? or just use older versions of Tensorflow?

Thank you !

--
You received this message because you are subscribed to the Google Groups "audioset-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audiose...@googlegroups.com.

Manoj Plakal

unread,
Feb 18, 2020, 3:41:21 PM2/18/20
to Roberta Rocca, Dan Ellis, audioset-users

Confirmed that the notebook indeed fails in the prediction step with TF v2.x.  (DAn: repro in notebook https://colab.sandbox.google.com/drive/12QDgeSnIB0xZalSxFiCtZtLhKU53h5_3#scrollTo=OCX3otFr8FET )

Roberta: could you open an issue on GitHub describing this and @-mention @plakal and @dpwe ?




To unsubscribe from this group and stop receiving emails from it, send an email to audioset-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/audioset-users/4af80b16-6921-4b39-8300-e64b8d5710b6%40googlegroups.com.

Roberta Rocca

unread,
Feb 18, 2020, 3:43:19 PM2/18/20
to audioset-users
Sure! Will do later today! 

Roberta Rocca

unread,
Feb 18, 2020, 8:00:47 PM2/18/20
to audioset-users
Or rather asap tomorrow. :) 
Reply all
Reply to author
Forward
0 new messages