Skip to content Skip to sidebar Skip to footer

Tensorflow Probability: Invalidargumenterror: Required Broadcastable Shapes

My data has channels_first format. When I use tensorflow probability layers I get the following error: Here is an example where the input shape is [1,28,28] and the reproducible co

Solution 1:

Your preprocess function is returning image, image instead of image, sample['label']. If you change this, it should work!

I think you can then drop the K.cast in your loss as well.

Update: actually when i run this i get nan's in the loss. Probably something else is wrong. But at least it gets past the shape error! 🤷‍♂️

Post a Comment for "Tensorflow Probability: Invalidargumenterror: Required Broadcastable Shapes"