79700758

Date: 2025-07-14 10:47:59
Score: 0.5
Natty:
Report link

The InvalidArgumentError occurred because dists(shape[10000]) could not broadcast directly with heights(shape[352]). This can be fixed by reshaping mu and sigma to [10000, 1], which enable implicit broadcasting to compute probabilities for all 352 heights against each of the 10,000 distributions and yields the desired [10000, 352] result without needing tf.map_fn or tf.vectorized_map. Please refer this gist for the mentioned approach.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Sagar