question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Batch normalization gradient requires mean and offset to have equal ranks.

See original GitHub issue

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]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
caisqcommented, 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.

0reactions
rthadurcommented, Jun 5, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

8.5. Batch Normalization - Dive into Deep Learning
Batch normalization is applied to individual layers, or optionally, to all of them: In each training iteration, we first normalize the inputs (of...
Read more >
tf.keras.layers.BatchNormalization | TensorFlow v2.11.0
Batch normalization applies a transformation that maintains the mean output close to 0 and the output standard deviation close to 1.
Read more >
Batch normalization in 3 levels of understanding
BN relies on batch first and second statistical moments (mean and variance) to normalize hidden layers activations. The output values are then ...
Read more >
Moving Mean and Moving Variance In Batch Normalization
In the second step for normalization, the “Normalize” op will take the batch mean/variance m' and v' as well as the scale (...
Read more >
BatchNormalization on non-last axis throws ValueError with ...
when using Tensorflow as backend, meaning the BatchNormalization layer can not be used with the channels_first format currently. This seems to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found