Skip to content

Commit 072ebef

Browse files
MarkDaoustcopybara-github
authored andcommitted
Add diagrams to guide/tensor
PiperOrigin-RevId: 311789447
1 parent 8576170 commit 072ebef

26 files changed

+871
-132
lines changed

site/en/community/contribute/code_style.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,10 @@ $ diff <my_cc_file> /tmp/my_cc_file.cc
8686

8787
## TensorFlow conventions and special uses
8888

89-
### Tensors
90-
91-
* Operations that deal with batches may assume that the **first dimension** of
92-
a Tensor is the batch dimension.
93-
* In most models, the **last dimension** is the number of _channels_.
94-
* Dimensions excluding the first and last usually make up the _space_
95-
dimensions: sequence-length, or image-size.
96-
* When possible, use a Tensor's overloaded operators rather than TensorFlow
97-
functions. For example, we prefer `**`, `+`, `/`, `*`, `-`, `and/or` over
98-
`tf.pow`, `tf.add`, `tf.divide`, `tf.multiply`, `tf.subtract`, and `tf.logical_*`
99-
unless a specific name for the operation is desired.
100-
101-
10289
### Python operations
10390

104-
A _Python operation_ is a function that, given input tensors and parameters,
105-
creates a part of the graph and returns output tensors.
91+
A TensorFlow _operation_ is a function that, given input tensors returns output
92+
tensors (or adds a op to a graph when building graphs).
10693

10794
* The first argument should be tensors, followed by basic Python parameters.
10895
The last argument is `name` with a default value of `None`.
3.97 KB
Loading
5.7 KB
Loading
7.23 KB
Loading
7.53 KB
Loading
10.2 KB
Loading
3.94 KB
Loading
5.86 KB
Loading
2.37 KB
Loading
2.77 KB
Loading

0 commit comments

Comments
 (0)