Skip to content

Commit 858d353

Browse files
committed
Fix doc
1 parent c2aa4e5 commit 858d353

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tensorflow_addons/losses/giou_loss.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ class GIOULoss(tf.keras.losses.Loss):
3333
Usage:
3434
3535
```python
36-
fl = tfa.losses.GIOU()
37-
loss = fl(
38-
[[0.97], [0.91], [0.03]],
39-
[[1], [1], [0])
40-
print('Loss: ', loss.numpy()) # Loss: [[0.03045921]
41-
[0.09431068]
42-
[0.31471074]
36+
gl = tfa.losses.GIOU()
37+
loss = gl(
38+
[[0, 0, 1, 1], [0, 0, 2, 2], [0, 0, 2, 2]],
39+
[[0, 0, 1, 1], [0, 0, 1, 2], [2, 2, 4, 4]])
40+
print('Loss: ', loss.numpy()) # Loss: [0, 0.5, 1.25]
4341
```
4442
Usage with tf.keras API:
4543
@@ -49,6 +47,7 @@ class GIOULoss(tf.keras.losses.Loss):
4947
```
5048
5149
Args
50+
reduction
5251
name: Op name
5352
5453
Returns:

0 commit comments

Comments
 (0)