Skip to content

Commit 8328d84

Browse files
imsheridanrmlarsen
authored andcommitted
Fix several formatting issues in python api guides (tensorflow#18121)
* Fix several formatting in python api guides * Fix minor format
1 parent e8c0e68 commit 8328d84

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

tensorflow/docs_src/api_guides/python/contrib.graph_editor.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ A subgraph can be created in several ways:
6161

6262
* using a list of ops:
6363

64-
```python
65-
my_sgv = ge.sgv(ops)
66-
```
64+
```python
65+
my_sgv = ge.sgv(ops)
66+
```
6767

6868
* from a name scope:
6969

70-
```python
71-
my_sgv = ge.sgv_scope("foo/bar", graph=tf.get_default_graph())
72-
```
70+
```python
71+
my_sgv = ge.sgv_scope("foo/bar", graph=tf.get_default_graph())
72+
```
7373

7474
* using regular expression:
7575

76-
```python
77-
my_sgv = ge.sgv("foo/.*/.*read$", graph=tf.get_default_graph())
78-
```
76+
```python
77+
my_sgv = ge.sgv("foo/.*/.*read$", graph=tf.get_default_graph())
78+
```
7979

8080
Note that the Graph Editor is meant to manipulate several graphs at the same
8181
time, typically during transform or copy operation. For that reason,

tensorflow/docs_src/api_guides/python/io_ops.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Note: Functions taking `Tensor` arguments can also take anything accepted by
88
## Placeholders
99

1010
TensorFlow provides a placeholder operation that must be fed with data
11-
on execution. For more info, see the section on @{$reading_data#feeding$Feeding data}.
11+
on execution. For more info, see the section on @{$reading_data#Feeding$Feeding data}.
1212

1313
* @{tf.placeholder}
1414
* @{tf.placeholder_with_default}
@@ -42,7 +42,7 @@ formats into tensors.
4242

4343
### Example protocol buffer
4444

45-
TensorFlow's @{$reading_data#standard-tensorflow-format$recommended format for training examples}
45+
TensorFlow's @{$reading_data#standard_tensorflow_format$recommended format for training examples}
4646
is serialized `Example` protocol buffers, [described
4747
here](https://www.tensorflow.org/code/tensorflow/core/example/example.proto).
4848
They contain `Features`, [described

tensorflow/docs_src/api_guides/python/nn.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bottom. Note that this is different from existing libraries such as cuDNN and
8989
Caffe, which explicitly specify the number of padded pixels and always pad the
9090
same number of pixels on both sides.
9191

92-
For the `'VALID`' scheme, the output height and width are computed as:
92+
For the `'VALID'` scheme, the output height and width are computed as:
9393

9494
out_height = ceil(float(in_height - filter_height + 1) / float(strides[1]))
9595
out_width = ceil(float(in_width - filter_width + 1) / float(strides[2]))
@@ -98,10 +98,10 @@ and no padding is used.
9898

9999
Given the output size and the padding, the output can be computed as
100100

101-
output[b, i, j, :] =
102-
sum_{di, dj} input[b, strides[1] * i + di - pad_top,
103-
strides[2] * j + dj - pad_left, ...] *
104-
filter[di, dj, ...]
101+
$$ output[b, i, j, :] =
102+
sum_{d_i, d_j} input[b, strides[1] * i + d_i - pad_{top},\
103+
strides[2] * j + d_j - pad_{left}, ...] *
104+
filter[d_i, d_j,\ ...]$$
105105

106106
where any value outside the original input image region are considered zero (
107107
i.e. we pad zero values around the border of the image).
@@ -161,12 +161,12 @@ Morphological operators are non-linear filters used in image processing.
161161
](https://en.wikipedia.org/wiki/Dilation_(morphology))
162162
is the max-sum counterpart of standard sum-product convolution:
163163

164-
output[b, y, x, c] =
164+
$$ output[b, y, x, c] =
165165
max_{dy, dx} input[b,
166166
strides[1] * y + rates[1] * dy,
167167
strides[2] * x + rates[2] * dx,
168168
c] +
169-
filter[dy, dx, c]
169+
filter[dy, dx, c]$$
170170

171171
The `filter` is usually called structuring function. Max-pooling is a special
172172
case of greyscale morphological dilation when the filter assumes all-zero
@@ -176,12 +176,12 @@ values (a.k.a. flat structuring function).
176176
](https://en.wikipedia.org/wiki/Erosion_(morphology))
177177
is the min-sum counterpart of standard sum-product convolution:
178178

179-
output[b, y, x, c] =
179+
$$ output[b, y, x, c] =
180180
min_{dy, dx} input[b,
181181
strides[1] * y - rates[1] * dy,
182182
strides[2] * x - rates[2] * dx,
183183
c] -
184-
filter[dy, dx, c]
184+
filter[dy, dx, c]$$
185185

186186
Dilation and erosion are dual to each other. The dilation of the input signal
187187
`f` by the structuring signal `g` is equal to the negation of the erosion of

0 commit comments

Comments
 (0)