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
Loading
Please sign in to comment