Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error raised when loading model_weights "include_top=True" #11

Open
TwistFateBOY opened this issue Apr 16, 2020 · 1 comment
Open

error raised when loading model_weights "include_top=True" #11

TwistFateBOY opened this issue Apr 16, 2020 · 1 comment

Comments

@TwistFateBOY
Copy link

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?

@sourav22899
Copy link

@TwistFateBOY This is the same issue raised in issue#2. The following solution is mentioned to solve it.

This is because the length of single example in our version is different from the slim one, i.e., 496 vs 96, or 4.96 vs 0.96. The different lengths could result in different feature dimensions after the flatten operation. To remove the problem, you can change the parameter into "NUM_FRAMES =96", "EXAMPLE_WINDOW_SECONDS = 0.96", and "EXAMPLE_HOP_SECONDS = 0.96".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants