Skip to content

Commit ccb41b8

Browse files
Update generated Python Op docs.
Change: 128474583
1 parent 4f55bea commit ccb41b8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.py_func.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### `tf.py_func(func, inp, Tout, name=None)` {#py_func}
1+
### `tf.py_func(func, inp, Tout, stateful=True, name=None)` {#py_func}
22

33
Wraps a python function and uses it as a tensorflow op.
44

@@ -23,6 +23,11 @@ sinh(x) as an op in the graph.
2323
* <b>`inp`</b>: A list of `Tensor`.
2424
* <b>`Tout`</b>: A list of tensorflow data types indicating what `func`
2525
returns.
26+
* <b>`stateful`</b>: A boolean indicating whether the function should be considered
27+
stateful or stateless. I.e. whether it, given the same input, will
28+
return the same output and at the same time does not change state
29+
in an observable way. Optimizations such as common subexpression
30+
elimination are only possible when operations are stateless.
2631
* <b>`name`</b>: A name for the operation (optional).
2732

2833
##### Returns:

tensorflow/g3doc/api_docs/python/script_ops.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ TensorFlow operators.
1515
## Other Functions and Classes
1616
- - -
1717

18-
### `tf.py_func(func, inp, Tout, name=None)` {#py_func}
18+
### `tf.py_func(func, inp, Tout, stateful=True, name=None)` {#py_func}
1919

2020
Wraps a python function and uses it as a tensorflow op.
2121

@@ -40,6 +40,11 @@ sinh(x) as an op in the graph.
4040
* <b>`inp`</b>: A list of `Tensor`.
4141
* <b>`Tout`</b>: A list of tensorflow data types indicating what `func`
4242
returns.
43+
* <b>`stateful`</b>: A boolean indicating whether the function should be considered
44+
stateful or stateless. I.e. whether it, given the same input, will
45+
return the same output and at the same time does not change state
46+
in an observable way. Optimizations such as common subexpression
47+
elimination are only possible when operations are stateless.
4348
* <b>`name`</b>: A name for the operation (optional).
4449

4550
##### Returns:

0 commit comments

Comments
 (0)