Skip to content

Commit

Permalink
Move noted TF styles from TFP to official TF style guide.
Browse files Browse the repository at this point in the history
Done together with tensorflow/docs#50.

PiperOrigin-RevId: 212513741
  • Loading branch information
dustinvtran authored and Copybara-Service committed Sep 11, 2018
1 parent dbc7d51 commit 27d7665
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ conventions may be moved upstream.)
gradients. It can also lead to unnecessary graph ops as subsequent TF calls
will keep creating a tensor from the same op.

4. Use overloaded operators rather than functions. For example, avoid `tf.pow`,
`tf.add`, `tf.div`, `tf.mul`, `tf.subtract`, and `tf.logical*`. (You must
use `tf.equal`, however, for assessing Tensor equality.)

Justification: using operators makes the code read more like the math.

5. Never write code that bakes in a TensorFlow session `eval()` or `run()`.

6. Every module should define the constant `__all__` in order to list all
public members of the module.

Expand Down

0 comments on commit 27d7665

Please sign in to comment.