dtaoo / vggish Goto Github PK
View Code? Open in Web Editor NEWAn implementation of vggish in keras with tf backend
An implementation of vggish in keras with tf backend
When using include_top=True, load_weights=True and your weight file, i get the following error:
ValueError: Dimension 0 in both shapes must be equal, but are 63488 and 12288. Shapes are [63488,4096] and [12288,4096]. for 'Assign_163' (op: 'Assign') with input shapes: [63488,4096], [12288,4096].
Loading weights without top layers seems to work fine.
Any ideas?
Hi, I run the vggish.py and got the ModuleNotFoundError like this:
ModuleNotFoundError: No module named 'sound'
and I did not find where is the sound module.
Did I miss something?
This repo is amazing, I mean, VGG-ish is a powerfull model, but tensorflow is a little bit complicated. However, Keras is far more easier to learn. Now a days keras is part of tensorflow itself, so here goes my question/suggestion:
have you considered adding this particular module to the original VGGish project?
For me, it looks like a great idea to keep it all together, I'd definitely do it, but perhaps you already tried it
Thanks
Could you please load the txt files
The weight files provided in the link, pose error when read or when loaded in the model directly.
My code:
import h5py
filename_wt='vggish_audioset_weights.h5'
f = h5py.File(filename_wt, 'r')
ERROR:
OSError: Unable to open file (unable to open file: name = 'vggish_audioset_weights.h5', errno = 22, error message = 'Invalid argument', flags = 0, o_flags = 0)
Hello
I've been reading your evaluation.py example, and I can't understand why weights aren't loaded when the VGGish model is made, nor it's fit after the model is made.
As I see it, those lines:
sound_model = VGGish(include_top=False, load_weights=False)
should be:
sound_model = VGGish(include_top=False, load_weights=True)
or after that, it should be fitted before used (which currently isn't).
With the current implementation (i.e. load_weights=False
), I run it on a subset of Speech Commands dataset, and I get the following results:
Report for testing
precision recall f1-score support
no 0.90 0.90 0.90 386
yes 0.90 0.90 0.90 397
accuracy 0.90 783
macro avg 0.90 0.90 0.90 783
weighted avg 0.90 0.90 0.90 783
however, only switching load_weights=True
, I get those:
Report for testing
precision recall f1-score support
no 0.92 0.98 0.95 386
yes 0.98 0.92 0.95 397
accuracy 0.95 783
macro avg 0.95 0.95 0.95 783
weighted avg 0.95 0.95 0.95 783
As I see it, if the networks are not initialized with given weights, nor fitted, then its weights are just random initializations and therefore, the features computed by the model are just random computations on the input and therefore they don add too much value to the model itself.
I would love to hear your thoughts on this
Did you train the models on the AudioSet for AED? How did you get the raw audio dataset?
Could you explain how to train the model without the fc layers?
Thanks!
here is the code
model = VGGish(include_top=True)
model.load_weights(WEIGHTS_PATH_TOP)
here is the bug
ValueError: Dimension 0 in both shapes must be equal, but are 63488 and 12288. Shapes are [63488,4096] and [12288,4096]. for 'Assign_12' (op: 'Assign') with input shapes: [63488,4096], [12288,4096].
what's wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.