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: Batch normalization gradient requires mean and offset to have equal ranks. #2120

Closed
GU8187 opened this issue Sep 30, 2019 · 6 comments
Assignees
Labels
comp:layers type:support user support questions

Comments

@GU8187
Copy link

GU8187 commented Sep 30, 2019

Hello Everyone,

[pix2pix][pix2pix.js][tensorflow.js]
I'm trying to set up online environment for my new learned pix2pix model. I have exported the .pict model with the guides kindly provided by @yining1023 & Dongphil Yoo.

TensorFlow.js version

https://cdn.jsdelivr.net/npm/@tensorflow/tfjs

Browser version

Google Chrome Version 77.0.3865.90 (Build officiel) (64 bits)
FIrefox quantum 69..0.1

Describe the problem or feature request

After .pict Model is loaded
Anything done with tools (Eraser/clear/pencil) produces error as following in Console

tfjs:2 Uncaught (in promise) Error: Batch normalization gradient requires mean and offset to have equal ranks.
at f (tfjs:2)
at As (tfjs:2)
at Object.batchNorm (tfjs:2)
at batchnorm (pix2pix.js:34)
at pix2pix.js:64
at tfjs:2
at t.scopedRun (tfjs:2)
at t.tidy (tfjs:2)
at Object._e [as tidy] (tfjs:2)
at Pix2pix.transfer (pix2pix.js:47)

Code to reproduce the bug / link to feature request

http://guillaumedamry.com/p2pampa/

Any hint on this (programming or orienting request on github) would be much appreciated because I am completly stuck.

I have compiled with python3 [pix2pix][pix2pix.js][tensorflow.js]

@caisq
Copy link
Collaborator

caisq commented Sep 30, 2019

FYI, #2114 contains a workaround to this issue for the implementation of LayerNormalization

@GU8187
Copy link
Author

GU8187 commented Sep 30, 2019

Thanks for your answer still I'm a bit confused...

  • Should there be an update to [pix2pix_tensorflowjs] repo

  • or should I update locally in my pix2pix-tensorflow/.git (before compiling a new .pict model),

  • or is this is a next master of tensorflowjs, so I should replace <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script> with a proper path, with local hosting of library's brand new version ?

Regards

@caisq
Copy link
Collaborator

caisq commented Sep 30, 2019

Just to be clear #2114 is not meant to be a fix to this problem. It's just relevant to the problem and shows how a user may in principle workaround it. The fix will come in a separate PR.

@GU8187
Copy link
Author

GU8187 commented Sep 30, 2019

Got it thanks, look forward to it !

@GU8187
Copy link
Author

GU8187 commented Nov 8, 2019

@dsmilkov Daniel, can you give me a hint on how to set the environment straight : what should I update, or change in my settings ?

@rthadur
Copy link
Contributor

rthadur commented Jun 5, 2020

Closing this due to lack of activity, feel to reopen. Thank you

@rthadur rthadur closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:layers type:support user support questions
Projects
None yet
Development

No branches or pull requests

4 participants