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

Uncaught Error: error in conv2dDerInput: depth of input (64) must match input depth for filter32 #281

Open
calvinlcchen opened this issue Feb 15, 2019 · 3 comments · May be fixed by #1414

Comments

@calvinlcchen
Copy link

calvinlcchen commented Feb 15, 2019

Nature of issue?

  • [* ] New feature request

Details about the Bug:

To improve the inference performance and support larger input image for style transfer, I try to reduce filter num to 1/4 ,for each layer when training model. ex. initial filter_num to 16 from 32 for 1st conv2d_layer.
Convert to variables, it can't be inferenced sucessfully. it show the error as subject.

Web browser and version: (e.g. Firefox version 65, Chrome version 71.0)

Chrome version 72.0

Operating System: (e.g. MacOS, Windows, Ubuntu)

Windows 10


New feature details:

support lower filter size for style transfer

@bomanimc
Copy link
Member

Hi @calvinlcchen. Do you mind sharing some example code that illustrates this issue? Would be happy to try to get a better understanding of your question/suggestion!

@calvinlcchen
Copy link
Author

calvinlcchen commented Sep 18, 2020 via email

@lindapaiste
Copy link
Contributor

Hi @calvinlcchen

This is an old issue but it's a very interesting feature request as I know that the StyleTransfer model is very memory-intensive.

There will definitely be issues if the numbers that are in the code don't match up with the shape of your weights variables.
Your situation is that you have models which are correctly trained to use a lesser number of inputs, but ml5 still expects the higher number, correct?

This seems like it is something that should be fixable on our end. The manifest.json contains enough information for us to work backwards and derive the correct constants.

I introduced a utility that can infer the IMAGE_SHAPE for some other models in PR #1387. It will need to be slightly different here because the StyleTransfer is just a manifest and raw weights rather than a complete TFJS model. But I will have fun playing with all of these great models that you've trained!

@lindapaiste lindapaiste linked a pull request Jun 12, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants