platform/upstream/tensorflow.git
6 years agoMake _USE_C_API = True and _USE_C_SHAPES = False work with handle data, take 2.
Skye Wanderman-Milne [Tue, 27 Mar 2018 22:07:05 +0000 (15:07 -0700)]
Make _USE_C_API = True and _USE_C_SHAPES = False work with handle data, take 2.

This change makes _set_shapes_for_outputs_c_api fetch and set
Tensor._handle_data. This is necessary for running the
Python shape inference code on resource tensors.

PiperOrigin-RevId: 190681459

6 years ago[tf.data] Raise error when window size is 0 in `tf.contrib.data.group_by_window()`.
Derek Murray [Tue, 27 Mar 2018 21:23:28 +0000 (14:23 -0700)]
[tf.data] Raise error when window size is 0 in `tf.contrib.data.group_by_window()`.

PiperOrigin-RevId: 190673466

6 years agoImprove error message when users forget to pass toco cmdline args for quantization...
Suharsh Sivakumar [Tue, 27 Mar 2018 21:17:16 +0000 (14:17 -0700)]
Improve error message when users forget to pass toco cmdline args for quantization, but have a model that has FAKE_QUANT operations.

PiperOrigin-RevId: 190672414

6 years agoAdd "serve" as a default value for savedmodel_tagset.
Nupur Garg [Tue, 27 Mar 2018 21:14:01 +0000 (14:14 -0700)]
Add "serve" as a default value for savedmodel_tagset.

PiperOrigin-RevId: 190671867

6 years agoFix documentation of Clamp; it does not take a computation at all.
Dimitris Vardoulakis [Tue, 27 Mar 2018 21:12:00 +0000 (14:12 -0700)]
Fix documentation of Clamp; it does not take a computation at all.

See:
https://github.com/tensorflow/tensorflow/blob/r1.6/tensorflow/compiler/xla/client/computation_builder.h#L668
PiperOrigin-RevId: 190671530

6 years agoFast path for calling pack when the list is full of eager tensors.
Akshay Modi [Tue, 27 Mar 2018 21:06:44 +0000 (14:06 -0700)]
Fast path for calling pack when the list is full of eager tensors.

FastPathExecute function also allows inputs to be sequences instead of just lists.

PiperOrigin-RevId: 190670587

6 years ago[TF:XLA] Force DebugOptions to be specified when calling HloModule::CreateModuleConfi...
Nick Desaulniers [Tue, 27 Mar 2018 19:55:56 +0000 (12:55 -0700)]
[TF:XLA] Force DebugOptions to be specified when calling HloModule::CreateModuleConfigFromProto

Otherwise it's easy to forget that you likely want the DebugOptions to be `legacy_flags::GetDebugOptionsFromFlags()`.

PiperOrigin-RevId: 190659046

6 years agoUpdating test so that it evaluates the optimized and original graph and checks whethe...
A. Unique TensorFlower [Tue, 27 Mar 2018 19:34:17 +0000 (12:34 -0700)]
Updating test so that it evaluates the optimized and original graph and checks whether the output tensors produced by them are the same.

PiperOrigin-RevId: 190655831

6 years agoImproved shape inference for reshape
Benoit Steiner [Tue, 27 Mar 2018 19:09:59 +0000 (12:09 -0700)]
Improved shape inference for reshape

PiperOrigin-RevId: 190651873

6 years agoReplaced calls to deprecated tensorflow::StringPiece methods with their
A. Unique TensorFlower [Tue, 27 Mar 2018 19:00:44 +0000 (12:00 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.

This will allow the deprecated methods to be removed.

PiperOrigin-RevId: 190650553

6 years agoExclude Python C extension from tensorflow/c:srcs target.
Skye Wanderman-Milne [Tue, 27 Mar 2018 18:54:26 +0000 (11:54 -0700)]
Exclude Python C extension from tensorflow/c:srcs target.

The Python extensions aren't part of the official C API.

PiperOrigin-RevId: 190649576

6 years agoFix: Clamp takes three arguments after computation, not arbitrarily many.
Dimitris Vardoulakis [Tue, 27 Mar 2018 18:27:11 +0000 (11:27 -0700)]
Fix: Clamp takes three arguments after computation, not arbitrarily many.

PiperOrigin-RevId: 190644837

6 years agoMatch behavior of py_func in graph and eager.
Alexandre Passos [Tue, 27 Mar 2018 18:09:50 +0000 (11:09 -0700)]
Match behavior of py_func in graph and eager.

PiperOrigin-RevId: 190641841

6 years agoInternal cleanup.
A. Unique TensorFlower [Tue, 27 Mar 2018 17:20:05 +0000 (10:20 -0700)]
Internal cleanup.

PiperOrigin-RevId: 190633067

6 years ago import tpu profiler analysis grpc python stub to tensorflow.
A. Unique TensorFlower [Tue, 27 Mar 2018 17:04:41 +0000 (10:04 -0700)]
  import tpu profiler analysis grpc python stub to tensorflow.

PiperOrigin-RevId: 190630641

6 years agoPrevent warning every time someone imports contrib.learn.datasets.base
James Keeling [Tue, 27 Mar 2018 16:36:52 +0000 (09:36 -0700)]
Prevent warning every time someone imports contrib.learn.datasets.base

Everything in contrib/learn/python/learn/datasets/base.py has been deprecated. One of the function in there is a decorator, retry. Because another function in that file is decorated with retry, the function is called upon import, which prints a warning.

I have fixed this by adding a private function, _internal_retry, which is used internally, and redefining retry to simply call this. That way, using retry in user-code will still print the deprecated warning, but it's not printed upon every import.

I also cleaned up the docstrings slightly.

PiperOrigin-RevId: 190626717

6 years agoFlush the output of print (fixes out-of-order prints in public colab)
A. Unique TensorFlower [Tue, 27 Mar 2018 16:20:54 +0000 (09:20 -0700)]
Flush the output of print (fixes out-of-order prints in public colab)

PiperOrigin-RevId: 190624708

6 years agoAutomated g4 rollback of changelist 188385868
Peter Hawkins [Tue, 27 Mar 2018 15:33:22 +0000 (08:33 -0700)]
Automated g4 rollback of changelist 188385868

PiperOrigin-RevId: 190618988

6 years agoOptimized quantized fully-connected op for LSTMs.
A. Unique TensorFlower [Tue, 27 Mar 2018 15:16:59 +0000 (08:16 -0700)]
Optimized quantized fully-connected op for LSTMs.

PiperOrigin-RevId: 190617310

6 years ago- Added support a different strategy for cov computations in the multi-tower scenario...
A. Unique TensorFlower [Tue, 27 Mar 2018 15:01:25 +0000 (08:01 -0700)]
- Added support a different strategy for cov computations in the multi-tower scenario.  In this strategy we do the cov computations locally on each tower and then sum the results, as opposed to concatenating everything onto a single device.  This other strategy can be enabled by setting the global variable TOWER_STRATEGY to "separate" (default value is "concat", which implements the old strategy).  We might change this to use "separate" by default if this turns out to be the best default.
- The code and documentation now no longer refer to the towers as computing different "mini-batches", since this was a confusing use of terminology.  The best way to think about things is that the combine data over all the towers forms the mini-batch.  Note however when factors process multiple towers using the "separate" strategy their batch_size variable will still refer to the amount of data in a single tower.
- Fixed a bug in how the "option 1" and "option 2" RNN Fisher approximations were computed in the multi-tower scenario.
- The "time-folded-into-batch" feature recently added has now changed in terms of what format it uses. Time is now the first dimension before the reshape, not the second, which is consistent with the convention used in other codebases.

PiperOrigin-RevId: 190615398

6 years agoDon't flush denormals when calling Eigen::SelfAdjointEigenSolver.
A. Unique TensorFlower [Tue, 27 Mar 2018 10:48:57 +0000 (03:48 -0700)]
Don't flush denormals when calling Eigen::SelfAdjointEigenSolver.

PiperOrigin-RevId: 190595222

6 years agoAvoid reading the input file twice for InitializableLookupTable in combination with...
A. Unique TensorFlower [Tue, 27 Mar 2018 10:23:58 +0000 (03:23 -0700)]
Avoid reading the input file twice for InitializableLookupTable in combination with HashTable.

Before this cl, TextFileLineIterator::total_size() was called for HashTable::DoPrepare, even though HashTable::DoPrepare ignores the size parameter.
In order to have a result ready for TextFileLineIterator::total_size(), Init() called GetNumLinesInTextFile(), which read the whole file. Just to throw away the result :-/

This cl:
- adds a DoLazyPrepare, that gets a functor to get the size, only if needed.
- add HashTable::DoLazyPrepare which does not call this functor.
- modify TextFileLineIterator::Init() to not call GetNumLinesInTextFile() anymore, when vocab_size was given as -1.
- modify TextFileLineIterator::total_size() to call GetNumLinesInTextFile() lazily on the first call, if vocab_size_ was passed as -1.

PiperOrigin-RevId: 190593744

6 years agoHandle out of range values when casting from floating point to integer in quantize.
A. Unique TensorFlower [Tue, 27 Mar 2018 07:30:02 +0000 (00:30 -0700)]
Handle out of range values when casting from floating point to integer in quantize.

PiperOrigin-RevId: 190580805

6 years agoRemove broken ibiblio url
Justine Tunney [Tue, 27 Mar 2018 07:02:42 +0000 (00:02 -0700)]
Remove broken ibiblio url

I suspect ibiblio selectively mirrors or perhaps only mirrors
highly popular artifacts.

PiperOrigin-RevId: 190578860

6 years agoFix acknowledgment to say "Blade Team of Tencent" in security.md file.
Michael Case [Tue, 27 Mar 2018 06:34:05 +0000 (23:34 -0700)]
Fix acknowledgment to say "Blade Team of Tencent" in security.md file.

Team is incorrectly referred to as "TenCent Blade Team"

PiperOrigin-RevId: 190577449

6 years ago[XLA:CPU] Allow the shape partition algorithm to partition the most minor
Bixia Zheng [Tue, 27 Mar 2018 05:44:27 +0000 (22:44 -0700)]
[XLA:CPU] Allow the shape partition algorithm to partition the most minor
dimension.

The current shape paritition algorithm does not partition the most minor
dimension, because doing so causes dynamic loop bounds for the inner loop and
used to prohibit LLVM vectorization. This constraint has been removed with
revision 328478 and LLVM can now vectorize loops with dynamic bounds. Allow
partitioning the most minor dimension is also necessary to support the
parallelization of matrix-vector multiplication.

Adjust shape_partition_test to reflect this change in the shape partition
algorithm.

PiperOrigin-RevId: 190574615

6 years agoUse is_resource_variable() in train.assert_gloabl_step.
A. Unique TensorFlower [Tue, 27 Mar 2018 05:30:15 +0000 (22:30 -0700)]
Use is_resource_variable() in train.assert_gloabl_step.

PiperOrigin-RevId: 190573872

6 years agoAdd class DistributionStrategy to python/training/, though not part
A. Unique TensorFlower [Tue, 27 Mar 2018 04:30:56 +0000 (21:30 -0700)]
Add class DistributionStrategy to python/training/, though not part
of the exposed TF API.

PiperOrigin-RevId: 190570489

6 years ago[XLA] Add tests for R1 PRED Slices.
Michael Kuperstein [Tue, 27 Mar 2018 03:18:03 +0000 (20:18 -0700)]
[XLA] Add tests for R1 PRED Slices.

PiperOrigin-RevId: 190566036

6 years agoInclude subscripts in the list of nodes accepted for replacement.
A. Unique TensorFlower [Tue, 27 Mar 2018 03:02:24 +0000 (20:02 -0700)]
Include subscripts in the list of nodes accepted for replacement.

PiperOrigin-RevId: 190564824

6 years agoDo not assume Attribute nodes always have a QN - it may be missing for attributes...
A. Unique TensorFlower [Tue, 27 Mar 2018 03:01:35 +0000 (20:01 -0700)]
Do not assume Attribute nodes always have a QN - it may be missing for attributes of dynamic objects, like function calls.

PiperOrigin-RevId: 190564784

6 years agoUpdating documentation of supported ops.
Nupur Garg [Tue, 27 Mar 2018 02:53:09 +0000 (19:53 -0700)]
Updating documentation of supported ops.

PiperOrigin-RevId: 190564365

6 years agoInclude additional cases for evaluating the fqn annotation.
A. Unique TensorFlower [Tue, 27 Mar 2018 02:46:51 +0000 (19:46 -0700)]
Include additional cases for evaluating the fqn annotation.

PiperOrigin-RevId: 190564036

6 years agoFix inconsistency in run_cond.
A. Unique TensorFlower [Tue, 27 Mar 2018 02:30:26 +0000 (19:30 -0700)]
Fix inconsistency in run_cond.

PiperOrigin-RevId: 190563114

6 years agoAdd "distribute" argument to tf.estimator.RunConfig() in anticipation
A. Unique TensorFlower [Tue, 27 Mar 2018 02:29:48 +0000 (19:29 -0700)]
Add "distribute" argument to tf.estimator.RunConfig() in anticipation
of upcoming DistributionStrategy support in Estimator.

PiperOrigin-RevId: 190563074

6 years ago[XLA] Redesign: implement and test ternary ops.
A. Unique TensorFlower [Tue, 27 Mar 2018 02:08:15 +0000 (19:08 -0700)]
[XLA] Redesign: implement and test ternary ops.

PiperOrigin-RevId: 190561679

6 years agoFinish deprecation of tf.contrib.bayesflow.{HMC,MetropolisHastings}.
Joshua V. Dillon [Tue, 27 Mar 2018 01:50:27 +0000 (18:50 -0700)]
Finish deprecation of tf.contrib.bayesflow.{HMC,MetropolisHastings}.
New home: https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/mcmc

PiperOrigin-RevId: 190560180

6 years ago[XLA] Redesign: handle metadata and sharding.
A. Unique TensorFlower [Tue, 27 Mar 2018 00:39:51 +0000 (17:39 -0700)]
[XLA] Redesign: handle metadata and sharding.

- Add a xla.OpSharding field to the HloInstructionProto.
- Metatdata handling is tested.

PiperOrigin-RevId: 190553731

6 years agoAdd missing parameter to OP_REQUIRES call.
A. Unique TensorFlower [Tue, 27 Mar 2018 00:02:55 +0000 (17:02 -0700)]
Add missing parameter to OP_REQUIRES call.

PiperOrigin-RevId: 190548854

6 years agoSave the last loss reduction method (for future use).
A. Unique TensorFlower [Mon, 26 Mar 2018 23:19:50 +0000 (16:19 -0700)]
Save the last loss reduction method (for future use).

PiperOrigin-RevId: 190543066

6 years agoRename convert_savedmodel to convert_saved_model
Suharsh Sivakumar [Mon, 26 Mar 2018 22:52:12 +0000 (15:52 -0700)]
Rename convert_savedmodel to convert_saved_model

to be consistent with export_saved_model

PiperOrigin-RevId: 190539064

6 years agoMakes tf.gather not silently snapshot resource variables.
Alexandre Passos [Mon, 26 Mar 2018 22:39:54 +0000 (15:39 -0700)]
Makes tf.gather not silently snapshot resource variables.

PiperOrigin-RevId: 190537320

6 years agoIn the experimental C API, parametrized batch_size for the generate dataset / iterato...
Mingsheng Hong [Mon, 26 Mar 2018 22:37:40 +0000 (15:37 -0700)]
In the experimental C API, parametrized batch_size for the generate dataset / iterator stack.

PiperOrigin-RevId: 190536945

6 years agoUpdate recompute_grad for TPU
A. Unique TensorFlower [Mon, 26 Mar 2018 22:34:21 +0000 (15:34 -0700)]
Update recompute_grad for TPU

PiperOrigin-RevId: 190536468

6 years ago[XLA] Redesign: implement and test unary and binary ops.
A. Unique TensorFlower [Mon, 26 Mar 2018 22:19:29 +0000 (15:19 -0700)]
[XLA] Redesign: implement and test unary and binary ops.

Also,
- Templatized ComputeAndCompareRX and CreateRXParameter so that they accept XlaBuilder and XlaOp.
- Clear data held by an XlaBuilder when Build() is called, otherwise errors will occur when the builder is reused.

PiperOrigin-RevId: 190534245

6 years agoFix some compiler warnings in MKL-DNN build.
A. Unique TensorFlower [Mon, 26 Mar 2018 22:07:10 +0000 (15:07 -0700)]
Fix some compiler warnings in MKL-DNN build.

PiperOrigin-RevId: 190532168

6 years agoClarify eager gradient doc strings
Igor Ganichev [Mon, 26 Mar 2018 21:33:10 +0000 (14:33 -0700)]
Clarify eager gradient doc strings

PiperOrigin-RevId: 190526387

6 years agoAdd description of shapes and a pointer to external tutorial notebook in `tf.distribu...
A. Unique TensorFlower [Mon, 26 Mar 2018 21:04:35 +0000 (14:04 -0700)]
Add description of shapes and a pointer to external tutorial notebook in `tf.distributions.Distribution`.

PiperOrigin-RevId: 190521666

6 years agoQuick fix to assign_moving_average documentation formatting.
A. Unique TensorFlower [Mon, 26 Mar 2018 20:41:35 +0000 (13:41 -0700)]
Quick fix to assign_moving_average documentation formatting.

PiperOrigin-RevId: 190517622

6 years agoGlobal rename of py2tf to autograph
A. Unique TensorFlower [Mon, 26 Mar 2018 20:30:17 +0000 (13:30 -0700)]
Global rename of py2tf to autograph

PiperOrigin-RevId: 190515509

6 years agoAdd additional protobuf imports.
Jiri Simsa [Mon, 26 Mar 2018 20:25:58 +0000 (13:25 -0700)]
Add additional protobuf imports.

PiperOrigin-RevId: 190514839

6 years agoInternal change.
Anna R [Mon, 26 Mar 2018 20:15:53 +0000 (13:15 -0700)]
Internal change.

PiperOrigin-RevId: 190512928

6 years agoAdd header guard to lstm_utils.
A. Unique TensorFlower [Mon, 26 Mar 2018 20:11:18 +0000 (13:11 -0700)]
Add header guard to lstm_utils.

PiperOrigin-RevId: 190512302

6 years agoOptimized ops, move code to early, common, section so that it can be shared.
A. Unique TensorFlower [Mon, 26 Mar 2018 20:08:54 +0000 (13:08 -0700)]
Optimized ops, move code to early, common, section so that it can be shared.

PiperOrigin-RevId: 190511964

6 years agoClarify doc strings on gradient methods
Igor Ganichev [Mon, 26 Mar 2018 19:47:47 +0000 (12:47 -0700)]
Clarify doc strings on gradient methods

PiperOrigin-RevId: 190508614

6 years agoInternal change.
Anna R [Mon, 26 Mar 2018 19:40:56 +0000 (12:40 -0700)]
Internal change.

PiperOrigin-RevId: 190507631

6 years agoInternal change.
Anna R [Mon, 26 Mar 2018 19:20:32 +0000 (12:20 -0700)]
Internal change.

PiperOrigin-RevId: 190504933

6 years agotfdbg CLI: Allow node exclusion with tensor filters
Shanqing Cai [Mon, 26 Mar 2018 19:16:34 +0000 (12:16 -0700)]
tfdbg CLI: Allow node exclusion with tensor filters

Fixes: #16619

See the referred GitHub issue for details, but users want to be
able to skip certain nodes when searching for inf/nans, because
some nodes generate inf/nans even in nominal conditions.

This CL adds a new optional flag `--filter_exclude_node_names`
(or `-fenn` for short), which allows users to do exactly that,
by using a regex for node names.

RELNOTES: tfdbg CLI: Allow exclusion of nodes by regular expressions
during tensor filter-enabled Session runs: see the new flags
`--filter_exclude_node_names` (or `-fenn` for short).
PiperOrigin-RevId: 190504225

6 years agoLSTM support: Support fused activation functions in int16 Add ops.
A. Unique TensorFlower [Mon, 26 Mar 2018 19:14:05 +0000 (12:14 -0700)]
LSTM support: Support fused activation functions in int16 Add ops.

PiperOrigin-RevId: 190503823

6 years agoExtended experimental C API with MNIST dataset/iterators support.
Mingsheng Hong [Mon, 26 Mar 2018 18:50:19 +0000 (11:50 -0700)]
Extended experimental C API with MNIST dataset/iterators support.

PiperOrigin-RevId: 190500020

6 years agoRevert to initializing number of threads when SetNumThreads is called. Requiring it
A. Unique TensorFlower [Mon, 26 Mar 2018 18:47:50 +0000 (11:47 -0700)]
Revert to initializing number of threads when SetNumThreads is called. Requiring it
to happen before OpInit() is way too confusing for users.

PiperOrigin-RevId: 190499644

6 years agoMake the CSE ("node deduping") pass in ArithmeticOptimizer more robust in the presenc...
A. Unique TensorFlower [Mon, 26 Mar 2018 18:44:19 +0000 (11:44 -0700)]
Make the CSE ("node deduping") pass in ArithmeticOptimizer more robust in the presence of ops that modify their inputs in-place: Do not dedup nodes if the underlying buffers for their outputs may be passed to an in-place op.

PiperOrigin-RevId: 190499037

6 years agoMade the NumElements function more accurate
Benoit Steiner [Mon, 26 Mar 2018 18:38:15 +0000 (11:38 -0700)]
Made the NumElements function more accurate

PiperOrigin-RevId: 190497916

6 years agotf.GradientTape: Clearly say that tf.while_loop and tf.cond are not supported
Asim Shankar [Mon, 26 Mar 2018 18:18:26 +0000 (11:18 -0700)]
tf.GradientTape: Clearly say that tf.while_loop and tf.cond are not supported
by tf.GradientTape.gradient() at this time.

PiperOrigin-RevId: 190494436

6 years agoBUGFIX: Fix failure-to-broadcast in Wishart.sample.
Joshua V. Dillon [Mon, 26 Mar 2018 18:15:37 +0000 (11:15 -0700)]
BUGFIX: Fix failure-to-broadcast in Wishart.sample.

PiperOrigin-RevId: 190493969

6 years agoFixes an issue with calling tf.contrib.seq2seq.dynamic_decode with an extended BasicD...
A. Unique TensorFlower [Mon, 26 Mar 2018 18:05:37 +0000 (11:05 -0700)]
Fixes an issue with calling tf.contrib.seq2seq.dynamic_decode with an extended BasicDecoder which for example returns a tf.contrib.seq2seq.AttentionWrapperState.
In this case the internal while-loop fails when trying to store an instance tf.contrib.seq2seq.AttentionWrapperState in the internal TensorArray.

PiperOrigin-RevId: 190491787

6 years ago[tf.data] Usability improvements to `tf.contrib.data.make_csv_dataset`.
Rachel Lim [Mon, 26 Mar 2018 17:52:46 +0000 (10:52 -0700)]
[tf.data] Usability improvements to `tf.contrib.data.make_csv_dataset`.

PiperOrigin-RevId: 190489086

6 years agoAdded experimental C APIs to build a stack of dataset + iterator nodes that
Mingsheng Hong [Mon, 26 Mar 2018 17:51:21 +0000 (10:51 -0700)]
Added experimental C APIs to build a stack of dataset + iterator nodes that
reads imagenet TFRecord files.

PiperOrigin-RevId: 190488817

6 years agoAdding a FunctionBufferingResourceReset Op that resets the state of the function...
Rohan Jain [Mon, 26 Mar 2018 17:25:46 +0000 (10:25 -0700)]
Adding a FunctionBufferingResourceReset Op that resets the state of the function buffering resource so that we can start using it with re-initializable iterators.

PiperOrigin-RevId: 190484110

6 years agoAutomated g4 rollback of changelist 190293303
A. Unique TensorFlower [Mon, 26 Mar 2018 17:00:20 +0000 (10:00 -0700)]
Automated g4 rollback of changelist 190293303

PiperOrigin-RevId: 190479555

6 years agoUpdated test (but not source) of https://www.tensorflow.org/api_docs/python/tf/contri...
A. Unique TensorFlower [Mon, 26 Mar 2018 15:52:53 +0000 (08:52 -0700)]
Updated test (but not source) of https://tensorflow.org/api_docs/python/tf/contrib/training/HParams to show that it allows '=' in the values.

PiperOrigin-RevId: 190470578

6 years agoDisable flaky prefetching_ops_test.
Gunhan Gulsoy [Mon, 26 Mar 2018 05:02:09 +0000 (22:02 -0700)]
Disable flaky prefetching_ops_test.

PiperOrigin-RevId: 190416108

6 years agoAlways cast `tf.distributions.Distribution` `_event_shape`, `_batch_shape`.
Joshua V. Dillon [Mon, 26 Mar 2018 04:57:09 +0000 (21:57 -0700)]
Always cast `tf.distributions.Distribution` `_event_shape`, `_batch_shape`.

PiperOrigin-RevId: 190415923

6 years agoMinor Error type and documentation fix.
Petros Mol [Mon, 26 Mar 2018 03:13:13 +0000 (20:13 -0700)]
Minor Error type and documentation fix.

PiperOrigin-RevId: 190411045

6 years agoUse compat.as_bytes() instead of str.encode().
Skye Wanderman-Milne [Mon, 26 Mar 2018 02:35:54 +0000 (19:35 -0700)]
Use compat.as_bytes() instead of str.encode().

PiperOrigin-RevId: 190409217

6 years agoAdd skeleton code for DebugStripper.
A. Unique TensorFlower [Sun, 25 Mar 2018 18:51:33 +0000 (11:51 -0700)]
Add skeleton code for DebugStripper.

PiperOrigin-RevId: 190391193

6 years agoRestore dependencies that are needed by the PIP package builder
A. Unique TensorFlower [Sun, 25 Mar 2018 16:38:54 +0000 (09:38 -0700)]
Restore dependencies that are needed by the PIP package builder

PiperOrigin-RevId: 190387090

6 years agoBuild and import rules for distributed strategy
Priya Gupta [Sun, 25 Mar 2018 06:42:08 +0000 (23:42 -0700)]
Build and import rules for distributed strategy

PiperOrigin-RevId: 190367484

6 years agoMisc typo fixes in the XLA sources and docs.
Dimitris Vardoulakis [Sat, 24 Mar 2018 07:24:50 +0000 (00:24 -0700)]
Misc typo fixes in the XLA sources and docs.

PiperOrigin-RevId: 190322644

6 years agoTrivial update of layer imports in eager execution examples, to reflect recommended...
Francois Chollet [Sat, 24 Mar 2018 06:04:03 +0000 (23:04 -0700)]
Trivial update of layer imports in eager execution examples, to reflect recommended practices.

PiperOrigin-RevId: 190319480

6 years ago[XLA] Redesign: implement Reshape and Transpose.
A. Unique TensorFlower [Sat, 24 Mar 2018 05:27:31 +0000 (22:27 -0700)]
[XLA] Redesign: implement Reshape and Transpose.

Also,
- Templatize ClientLibraryTestBase::CreateParameterAndTransferLiteral. The implementation is moved from .cc to .h because otherewise the linker complains.
- Migrate some reshape tests to use the XlaBuilder.

PiperOrigin-RevId: 190317960

6 years ago[XLA] Prevent using XlaOp from the wrong XlaBuilder.
A. Unique TensorFlower [Sat, 24 Mar 2018 03:20:49 +0000 (20:20 -0700)]
[XLA] Prevent using XlaOp from the wrong XlaBuilder.

PiperOrigin-RevId: 190312254

6 years agoA couple of small device-related utilities.
A. Unique TensorFlower [Sat, 24 Mar 2018 03:18:46 +0000 (20:18 -0700)]
A couple of small device-related utilities.

PiperOrigin-RevId: 190312148

6 years agoFix loop variable type and status propagation
A. Unique TensorFlower [Sat, 24 Mar 2018 02:24:04 +0000 (19:24 -0700)]
Fix loop variable type and status propagation

PiperOrigin-RevId: 190308776

6 years agoAdding support for iterating through a tf.data.Dataset for a single epoch.
A. Unique TensorFlower [Sat, 24 Mar 2018 02:02:37 +0000 (19:02 -0700)]
Adding support for iterating through a tf.data.Dataset for a single epoch.

PiperOrigin-RevId: 190307545

6 years agoWhen import_scoped_meta_graph is called within a name scope,
A. Unique TensorFlower [Sat, 24 Mar 2018 01:44:35 +0000 (18:44 -0700)]
When import_scoped_meta_graph is called within a name scope,
but called without an import_scope, the names of the created
variables are wrong, resulting in key not found errors when
adding these variables to their corresponding collections.

PiperOrigin-RevId: 190306555

6 years agoSwitch Android C++ compilation mode to "-std=c++11".
A. Unique TensorFlower [Sat, 24 Mar 2018 01:39:29 +0000 (18:39 -0700)]
Switch Android C++ compilation mode to "-std=c++11".

PiperOrigin-RevId: 190306256

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Sat, 24 Mar 2018 00:49:47 +0000 (17:49 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 190302194

6 years agoSet the stream in TransformTensor.
Guangda Lai [Sat, 24 Mar 2018 00:28:10 +0000 (17:28 -0700)]
Set the stream in TransformTensor.

PiperOrigin-RevId: 190300166

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Sat, 24 Mar 2018 00:19:10 +0000 (17:19 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 190299240

6 years agoMake _USE_C_API = True and _USE_C_SHAPES = False work with handle data.
Skye Wanderman-Milne [Fri, 23 Mar 2018 23:28:16 +0000 (16:28 -0700)]
Make _USE_C_API = True and _USE_C_SHAPES = False work with handle data.

This change makes _set_shapes_for_outputs_c_api fetch and set
Tensor._handle_data. This is necessary for running the
Python shape inference code on resource tensors.

PiperOrigin-RevId: 190293303

6 years agobug fix: evaluate nodes before swap the original graph
A. Unique TensorFlower [Fri, 23 Mar 2018 23:16:22 +0000 (16:16 -0700)]
bug fix: evaluate nodes before swap the original graph

PiperOrigin-RevId: 190291844

6 years agoMoves TensorHandleCopyToDevice to TensorHandle::CopyToDevice.
Alexandre Passos [Fri, 23 Mar 2018 23:15:55 +0000 (16:15 -0700)]
Moves TensorHandleCopyToDevice to TensorHandle::CopyToDevice.

PiperOrigin-RevId: 190291768

6 years ago[XLA] Redesign: implement local client and local service interface.
A. Unique TensorFlower [Fri, 23 Mar 2018 23:13:13 +0000 (16:13 -0700)]
[XLA] Redesign: implement local client and local service interface.

PiperOrigin-RevId: 190291400

6 years agoExtended scatter operations to work with a scalar update parameter and added scatter...
A. Unique TensorFlower [Fri, 23 Mar 2018 23:00:14 +0000 (16:00 -0700)]
Extended scatter operations to work with a scalar update parameter and added scatter-min and scatter-max operations.

PiperOrigin-RevId: 190289664

6 years ago[XLA:CPU] Update calls to IRBuilder::CreateMemCpy to the 2-alignment form.
Benjamin Kramer [Fri, 23 Mar 2018 22:52:35 +0000 (15:52 -0700)]
[XLA:CPU] Update calls to IRBuilder::CreateMemCpy to the 2-alignment form.

The single alignment version is going away.

PiperOrigin-RevId: 190288581

6 years ago[XLA] Don't CSE instructions which have side-effects
David Majnemer [Fri, 23 Mar 2018 22:34:47 +0000 (15:34 -0700)]
[XLA] Don't CSE instructions which have side-effects

PiperOrigin-RevId: 190285774

6 years agoAdding support for analyzing assignment info for nested tuples.
A. Unique TensorFlower [Fri, 23 Mar 2018 22:33:33 +0000 (15:33 -0700)]
Adding support for analyzing assignment info for nested tuples.

PiperOrigin-RevId: 190285584

6 years ago[TF:XLA] Fix PotentiallyImplementedAsEigenConvolution to use the correct shape as...
A. Unique TensorFlower [Fri, 23 Mar 2018 22:12:35 +0000 (15:12 -0700)]
[TF:XLA] Fix PotentiallyImplementedAsEigenConvolution to use the correct shape as the kernel shape

A small bug is found in accessing the kernel's shape of the convolution instruction in PotentiallyImplementedAsEigenConvolution. The bug was fixed and a new testcase is created to reveal the bug.

PiperOrigin-RevId: 190282385

6 years agoConvert the eager SPINN example to use tf.keras.Model and object-based checkpointing.
Allen Lavoie [Fri, 23 Mar 2018 22:12:21 +0000 (15:12 -0700)]
Convert the eager SPINN example to use tf.keras.Model and object-based checkpointing.

Uses a more recursive/functional tracking style which avoids numbering layers. Maybe this is too magical and we should adapt tf.keras.Sequential first? Let me know what you think.

PiperOrigin-RevId: 190282346