Commit ebeb598c authored by Joshua V. Dillon's avatar Joshua V. Dillon Committed by TensorFlower Gardener
Browse files

Correctly check shape not None in Keras `add_weight`.

When calling Keras add_weight with a np list, as written the `shape or
()` "trick" results in the following exception:
"""ValueError: The truth value of an array with more than one element is
ambiguous. Use a.any() or a.all()"""
This change fixes the problem by using an explicit `if`.

PiperOrigin-RevId: 236407103
parent fc33a70c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment