| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
This is to match the existing behavior of tf.cond.
PiperOrigin-RevId: 216534084
|
|
|
|
|
|
|
|
|
|
|
|
| |
function calls.
E.g. register_kl calls would trigger such warnings. This spam was exacerbated
by the fact that it happens before logging is initialized, so it is dumped
prominently to STDERR. Worse yet it also happened no matter whether the user
imported any symbols from tf.distributions or not as the relevant code is
executed when you import TensorFlow.
PiperOrigin-RevId: 216396036
|
|
|
|
|
|
|
| |
_SUMMARY_WRITER_INIT_COLLECTION_NAME collections from the summaryV2
implementation. Replacing them with global variables.
PiperOrigin-RevId: 216383152
|
|
|
|
| |
PiperOrigin-RevId: 216370193
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| | |
PiperOrigin-RevId: 216210141
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This benchmark creates many intermediates values, so we can make sure there's no performance overhead (it looks like there might be currently, or it might be from some other difference). It also runs in a defun and in legacy graph mode.
Results from my machine:
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v1_defun"
iters: 500
wall_time: 1.25822591782
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v2_defun"
iters: 500
wall_time: 5.99376106262
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v1_graph"
iters: 500
wall_time: 2.05277585983
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v2_graph"
iters: 500
wall_time: 2.84808516502
}
Clearly we have some work to do! I haven't looked into the time differences at all yet.
PiperOrigin-RevId: 216202325
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: 215989111
|
| |
| |
| |
| |
| |
| |
| |
| | |
Automated rollback of PR #21945
END_PUBLIC
Automated rollback of commit 863f61412fcc654840c6b67473b742ea4e5e964e. Revert #21945.
PiperOrigin-RevId: 215913175
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 215824410
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215811680
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
tf.gradients currently returns [NONE] when the gradient of unconnected variables
is required. This backwards compatable change adds in the option to have zero
tensors returned that match the dimensions of the input tensor.
PiperOrigin-RevId: 215725488
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215711383
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215492782
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | | |
tf.distributions API.
PiperOrigin-RevId: 215441733
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215431884
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215392621
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
StaticRegexReplace.
PiperOrigin-RevId: 215371291
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
better handle small values.
PiperOrigin-RevId: 215299532
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
released under Apache 2.0.
PiperOrigin-RevId: 215296386
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215278033
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/tensorflow/community/pull/16.
In addition to the changes in the doc, I made the following updates (these changes make sense to me and I didn't notice them when compiling the doc):
* deprecate saved_model.builder.SavedModelBuilder - replaced with saved_model.SavedModelBuilder
* deprecate python_io.tf_record_iterator - replaced with io.tf_record_iterator
* deprecate python_io.TFRecordWriter - replaced with io.TFRecordWriter
* move reduce_join to tf.string
PiperOrigin-RevId: 215253944
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
keras.SimpleRNNCell.
PiperOrigin-RevId: 215249611
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215211485
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
context.
This resembles the behaviour for initializer ops.
PiperOrigin-RevId: 215187942
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215133508
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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: 214964988
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Revert #20539.
PiperOrigin-RevId: 214849875
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 214824023
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The new implementation ensures that the 'constraints' kwarg is propagated by customer getters whose signature includes a keyworded, variable length argument dictionary, as well as those explicitly including the 'constraints' argument.
PiperOrigin-RevId: 214767296
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 214700693
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | | |
|
| | | | |\
| |_|_|_|/
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 214376416
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 214370113
|
| | | | | |
|