Fix documentation formatting for OneHot op.
PiperOrigin-RevId: 225048682
This commit is contained in:
parent
4fe05f35cf
commit
39b6e1924e
@ -66,7 +66,6 @@ Examples
|
||||
=========
|
||||
|
||||
Suppose that
|
||||
|
||||
```
|
||||
indices = [0, 2, -1, 1]
|
||||
depth = 3
|
||||
@ -76,16 +75,15 @@ Suppose that
|
||||
```
|
||||
|
||||
Then output is `[4 x 3]`:
|
||||
|
||||
```output =
|
||||
```
|
||||
output =
|
||||
[5.0 0.0 0.0] // one_hot(0)
|
||||
[0.0 0.0 5.0] // one_hot(2)
|
||||
[0.0 0.0 0.0] // one_hot(-1)
|
||||
[0.0 5.0 0.0] // one_hot(1)
|
||||
```
|
||||
```
|
||||
|
||||
Suppose that
|
||||
|
||||
```
|
||||
indices = [0, 2, -1, 1]
|
||||
depth = 3
|
||||
@ -95,19 +93,19 @@ Suppose that
|
||||
```
|
||||
|
||||
Then output is `[3 x 4]`:
|
||||
|
||||
```output =
|
||||
```
|
||||
output =
|
||||
[0.0 3.0 3.0 3.0]
|
||||
[3.0 3.0 3.0 0.0]
|
||||
[3.0 3.0 3.0 3.0]
|
||||
[3.0 0.0 3.0 3.0]
|
||||
// ^ one_hot(0)
|
||||
// ^ one_hot(2)
|
||||
// ^ one_hot(-1)
|
||||
// ^ one_hot(1)
|
||||
```
|
||||
Suppose that
|
||||
// ^ one_hot(0)
|
||||
// ^ one_hot(2)
|
||||
// ^ one_hot(-1)
|
||||
// ^ one_hot(1)
|
||||
```
|
||||
|
||||
Suppose that
|
||||
```
|
||||
indices = [[0, 2], [1, -1]]
|
||||
depth = 3
|
||||
@ -117,14 +115,15 @@ Suppose that
|
||||
```
|
||||
|
||||
Then output is `[2 x 2 x 3]`:
|
||||
|
||||
```output =
|
||||
```
|
||||
output =
|
||||
[
|
||||
[1.0, 0.0, 0.0] // one_hot(0)
|
||||
[0.0, 0.0, 1.0] // one_hot(2)
|
||||
][
|
||||
[0.0, 1.0, 0.0] // one_hot(1)
|
||||
[0.0, 0.0, 0.0] // one_hot(-1)
|
||||
]```
|
||||
]
|
||||
```
|
||||
END
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user