| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
This is to match the existing behavior of tf.cond.
PiperOrigin-RevId: 216534084
|
|
|
|
| |
PiperOrigin-RevId: 216483746
|
|
|
|
| |
PiperOrigin-RevId: 216483744
|
|
|
|
| |
PiperOrigin-RevId: 216442569
|
|
|
|
|
|
| |
tensorflowtestcase.
PiperOrigin-RevId: 216363450
|
|
|
|
|
|
|
|
| |
Doesn't attempt to deal with cases where we might have already generated
the functiondef for the parent function as in that case we cannot easily
modify the forward pass.
PiperOrigin-RevId: 216243224
|
|
|
|
|
|
| |
benchmarking. At the moment, it returns a default config with only Grappler dependency optimizer disabled. Many benchmarks wrap the subgraph they want to time in control_flow_ops.group() to avoid including the overhead of copying the output back to the Python client in the measurement. In the graph, this only adds a control dependency between the subgraph output and the fetch node, which in turn (often) causes the dependency optimizer to turn all nodes in the graph into no-ops.
PiperOrigin-RevId: 216242463
|
|\
| |
| |
| | |
PiperOrigin-RevId: 216217509
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current logic tries to bubble the forward pass tensor to the outermost
graph. That might not always be do-able e.g. when the cond is inside a while loop
it will need to know accumulator logic for while_loop. So instead, the cond_grad
now captures tensors from the forward If op's graph. When the grad If op is
built these tensors will be appropriately captured by the surrounding FuncGraph.
PiperOrigin-RevId: 215993009
|
| |
| |
| |
| | |
PiperOrigin-RevId: 215985679
|
| |
| |
| |
| |
| |
| | |
Enable GPU tests for cond_v2.
PiperOrigin-RevId: 215956220
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 215947463
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215797256
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215788359
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"character" is treated:
* BYTE: Position & length refer to bytes in the string. (Default)
* UTF8: The string is interpreted as UTF-8 encoded Unicode code points, and position & length are treated relative to them.
RELNOTES: Add option to get substring using Unicode characters
PiperOrigin-RevId: 215773373
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
During graph construction, the shape function for AssignAddVariableOp etc.
would raise an error when the value being "assign add"ed to the variable
has an incompatible shape.
With eager execution, no such validation was being made which triggerred
an assertion failure in eigen:
https://github.com/eigenteam/eigen-git-mirror/blob/7d97e1cbbe4424fda39e31c88def7c0863897640/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h#L479
This change prevents that assertion failure.
PiperOrigin-RevId: 215749071
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215711383
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215643600
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add a warning to not disable optimizers without consulting with the Grappler team.
PiperOrigin-RevId: 215584369
|
| | |
| | |
| | |
| | |
| | |
| | | |
and the rank derived from the permutation array is 0 or 1, the shape is ambiguous and cannot be determined at graph construction time. In this case, forward the shape of the input.
PiperOrigin-RevId: 215583050
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215518288
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215512168
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215492782
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215485333
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
may be replaced by automatic shape inference in TF 2.0 (or before).
Add a output_shapes attr to While op to allow output shapes to be different from the incoming loop_vars.
PiperOrigin-RevId: 215446737
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215392621
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215338403
|
| | |
| | |
| | |
| | |
| | |
| | | |
better handle small values.
PiperOrigin-RevId: 215299532
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Prior to this change, the lowering pass assumed that the If op
functions would be available in the If op's graph. If the If op is
defined in a defun and then called via eager execution, the functions
will be in the eager context, but not in the defun's graph. This
change makes the lowering pass correctly use the function library
passed in by the caller via GraphOptimizationPassOptions.
PiperOrigin-RevId: 215271990
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215269882
|
| | |
| | |
| | |
| | |
| | |
| | | |
keras.SimpleRNNCell.
PiperOrigin-RevId: 215249611
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215211485
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214986756
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add a single test flag for enabling v2 control flow in tests since we do not plan to support v2 ops with legacy control flow.
We have 2 test decorators now:
@with_control_flow_v2: Enables all tests in a class to run with v2 control flow.
@disable_control_flow_v2: Disables a test function from running in v2. I have removed the skiptests to avoid setup/teardown overheads.
Enable tests in control_flow_ops_py_test that run with control_flow_v2.
PiperOrigin-RevId: 214980108
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214853860
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214824023
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
based on standard ranges.
PiperOrigin-RevId: 214796357
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
sample-like args to Tensors.
After this change, you could conceivably write tfd.Normal(0., 1.).log_prob(1)
The tf core distributions can't use tfp dtype_util.common_dtype, so you can't yet write tfd.Normal(0, 1).
Works around an eager bug that loses precision in the presence in tf.convert_to_tensor(0.5, preferred_dtype=tf.int32)
PiperOrigin-RevId: 214666222
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214614405
|
| | | |\
| |_|_|/
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These ops were never intended to support integer dtypes, and the
OpKernels have already been removed in a previous patch.
PiperOrigin-RevId: 214542750
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
length" is defined:
* BYTE: The number of bytes in each string. (Default)
* UTF8: The number of UTF-8 encoded Unicode code points in each string.
RELNOTES: Add option to calculate string length in Unicode characters
PiperOrigin-RevId: 214478470
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
failing when running with P100.
PiperOrigin-RevId: 214477405
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214448656
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
linear_operator_circulant_test.
Also:
* Instead of overwriting self.test_session(), overwrite self._constrain_devices_and_set_default() to remap the kernel operations (this way self.cached_session(), self.test_session() and self.session() are all correct).
* Make linear_operator_test_util use self.session(graph=...) instead of self.test_session(graph=...) (semantically equivalent).
PiperOrigin-RevId: 214448118
|
| | | | |
|
| |\ \ \
| |/ / /
|/| | |
| | | | |
assign_in_part_vars
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 214381126
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Temporary rollback to fix forward compatibility.
END_PUBLIC
Automated rollback of commit 0c48c703c3c1455cf3b2c0e47e2108e053ff83e2. Revert #21798.
PiperOrigin-RevId: 214349479
|