Skip to content

Commit d1b404d

Browse files
corrected the example code in unit_normalization.py (#19845)
Added missing closing bracket and exact output value in example code after replicating the code.
1 parent 101119f commit d1b404d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

keras/src/layers/normalization/unit_normalization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ class UnitNormalization(Layer):
1414
1515
>>> data = np.arange(6).reshape(2, 3)
1616
>>> normalized_data = keras.layers.UnitNormalization()(data)
17-
>>> print(np.sum(normalized_data[0, :] ** 2)
18-
1.0
17+
>>> print(np.sum(normalized_data[0, :] ** 2))
18+
0.99999994
19+
1920
2021
Args:
2122
axis: Integer or list/tuple. The axis or axes to normalize across.

0 commit comments

Comments
 (0)