platform/upstream/tensorflow.git
6 years agoDon't assign device for the keras part of _saved_first_checkpoint. Fix #14504.
Yifei Feng [Wed, 21 Feb 2018 23:07:05 +0000 (15:07 -0800)]
Don't assign device for the keras part of _saved_first_checkpoint. Fix #14504.

PiperOrigin-RevId: 186526175

6 years agoDon't require shape functions when creating ops from Python using the C API.
Skye Wanderman-Milne [Wed, 21 Feb 2018 22:56:13 +0000 (14:56 -0800)]
Don't require shape functions when creating ops from Python using the C API.

There are many ops out there without shape functions, and it's very
onerous to add UnknownShape to all of them.

PiperOrigin-RevId: 186524294

6 years agoMark the `SerializeSparseOp<Variant>` kernel as inexpensive.
Derek Murray [Wed, 21 Feb 2018 22:46:29 +0000 (14:46 -0800)]
Mark the `SerializeSparseOp<Variant>` kernel as inexpensive.

Since this op only performs a constant amount of work, and typically
executes in a few microseconds, it should be profitable to execute
this op inline, rather than scheduling it on a remote thread.

PiperOrigin-RevId: 186522885

6 years agoRecord gradient in C
Akshay Modi [Wed, 21 Feb 2018 22:42:11 +0000 (14:42 -0800)]
Record gradient in C

PiperOrigin-RevId: 186522240

6 years agoImprove error message.
Jianwei Xie [Wed, 21 Feb 2018 22:40:18 +0000 (14:40 -0800)]
Improve error message.

PiperOrigin-RevId: 186521902

6 years agoEnsured that the model pruner outputs the nodes of the optimized graph in a
Benoit Steiner [Wed, 21 Feb 2018 22:29:27 +0000 (14:29 -0800)]
Ensured that the model pruner outputs the nodes of the optimized graph in a
deterministic order

PiperOrigin-RevId: 186520272

6 years agoMake CPUAllocator VisitableAllocator, for better RDMA networking.
A. Unique TensorFlower [Wed, 21 Feb 2018 22:14:42 +0000 (14:14 -0800)]
Make CPUAllocator VisitableAllocator, for better RDMA networking.

PiperOrigin-RevId: 186518037

6 years agoMake with_c_api a no-op if the C API is already enabled.
Skye Wanderman-Milne [Wed, 21 Feb 2018 22:07:48 +0000 (14:07 -0800)]
Make with_c_api a no-op if the C API is already enabled.

This will help transition to turning the C API on by default by
preventing new tests from breaking.

PiperOrigin-RevId: 186516976

6 years ago[XLA:CPU] Don't hard-code lane width in horizontal sum routine
Sanjoy Das [Wed, 21 Feb 2018 21:33:07 +0000 (13:33 -0800)]
[XLA:CPU] Don't hard-code lane width in horizontal sum routine

The bulk of change is actually in dot_operation_test to get it to the point
where it would have caught this bug.  I made the following changes:

 - Moved some tests under a "no layout assignment pass runs" mode.  This lets
   us test the layout specific aspects of the dot operation more thoroughly.
   Unfortunately not many tests can be run in this mode -- for instance dot
   tests that calls into Eigen won't work here because they need a specific
   layout assignment for correctness.  Tests that runs with layout assignment
   enabled but with non-default layouts are essentially integration tests that
   check that the layout assignment pass + the dot lowering work correctly.

 - Changed the matrix-vector dot tests to check all 4 layouts and the
   matrix-vector Ax+b fusion tests to check all 8 layouts.

 - Duplicated some of the F32 tests to run for F64.

 - Added some new test shapes.

PiperOrigin-RevId: 186511289

6 years agoInternal change.
Jeremy Lau [Wed, 21 Feb 2018 21:28:23 +0000 (13:28 -0800)]
Internal change.

PiperOrigin-RevId: 186510594

6 years agoActivity analysis annotation on FunctionDef
A. Unique TensorFlower [Wed, 21 Feb 2018 21:25:47 +0000 (13:25 -0800)]
Activity analysis annotation on FunctionDef

PiperOrigin-RevId: 186510035

6 years agoIn VirtualScheduler, if there is a Recv without a Send, handle the Recv as an
A. Unique TensorFlower [Wed, 21 Feb 2018 21:24:35 +0000 (13:24 -0800)]
In VirtualScheduler, if there is a Recv without a Send, handle the Recv as an
initially ready node.

PiperOrigin-RevId: 186509851

6 years agoK-FAC: LM algorithm for adapting damping, Example to train MNIST autoencoder model...
A. Unique TensorFlower [Wed, 21 Feb 2018 21:20:58 +0000 (13:20 -0800)]
K-FAC: LM algorithm for adapting damping, Example to train MNIST autoencoder model using variable size training data and update damping parameter, add KFACOptimizer.{update_damping}.

PiperOrigin-RevId: 186509305

6 years agoMade tf.HParams compatible with https://github.com/google/pytype.
A. Unique TensorFlower [Wed, 21 Feb 2018 21:16:52 +0000 (13:16 -0800)]
Made tf.HParams compatible with https://github.com/google/pytype.

PiperOrigin-RevId: 186508693

6 years agoAdd test that checks all core ops have shape functions.
Skye Wanderman-Milne [Wed, 21 Feb 2018 21:14:27 +0000 (13:14 -0800)]
Add test that checks all core ops have shape functions.

This is meant to be a replacement for the current Python code that
checks that core ops have shape functions registered. Some ops were
missing a shape function, so I added UnknownShape.

This also adds an OpRegistry::GetOpRegistrationData() method for
fetching all the shape functions.

PiperOrigin-RevId: 186508356

6 years agoChange node to Identity operation for shuffle/reverse operations on scalar values...
A. Unique TensorFlower [Wed, 21 Feb 2018 20:57:26 +0000 (12:57 -0800)]
Change node to Identity operation for shuffle/reverse operations on scalar values, but not
directly removing those nodes from the graph.

PiperOrigin-RevId: 186505857

6 years agoEnsure that final layer of networks (which doesn't have an activation) get correctly...
Suharsh Sivakumar [Wed, 21 Feb 2018 20:57:05 +0000 (12:57 -0800)]
Ensure that final layer of networks (which doesn't have an activation) get correctly quantized.

PiperOrigin-RevId: 186505814

6 years agoFix a bug in tf.metrics.mean_tensor for case that the weights are very small.
A. Unique TensorFlower [Wed, 21 Feb 2018 20:42:51 +0000 (12:42 -0800)]
Fix a bug in tf.metrics.mean_tensor for case that the weights are very small.

We have renamed metrics_test.MeanTensorTest.testWeighted1d as metrics_test.MeanTensorTest.testBinaryWeighted1d, since the weights on the instances are zeros and ones.

We have added a new metrics_test.MeanTensorTest.testWeighted1d that has small weights. It was failing for the previous implementation, but passes now.

Now the code for mean_tensor() and mean() now use the same _safe_div method. Previously, mean_tensor() used a different means to ensure that we don't divide by zero. This set the denominator to max(1., sum(weights)), which was inaccurate when sum(weights) is non-zero, but less than one.

PiperOrigin-RevId: 186503714

6 years agoAllow non-integer values for Poisson CDF/PMF.
A. Unique TensorFlower [Wed, 21 Feb 2018 20:36:25 +0000 (12:36 -0800)]
Allow non-integer values for Poisson CDF/PMF.

PiperOrigin-RevId: 186502845

6 years agoMerge tf.layers.GraphNetwork into tf.keras.Network and remove it.
Francois Chollet [Wed, 21 Feb 2018 20:33:41 +0000 (12:33 -0800)]
Merge tf.layers.GraphNetwork into tf.keras.Network and remove it.

PiperOrigin-RevId: 186502476

6 years agoeager/mnist: Point to the example in tensorflow/models instead.
Asim Shankar [Wed, 21 Feb 2018 20:32:52 +0000 (12:32 -0800)]
eager/mnist: Point to the example in tensorflow/models instead.

PiperOrigin-RevId: 186502375

6 years agoframework/ops.py: Stricter check for use of the C API for graph construction.
Asim Shankar [Wed, 21 Feb 2018 20:31:27 +0000 (12:31 -0800)]
framework/ops.py: Stricter check for use of the C API for graph construction.

Fixes #16913

Didn't add an explicit test for this since arguably use of the C API for graph
construction will soon become the default, so I figured testing that
tfe.defun's use of _use_c_api_hack() would only add code that should be deleted
soon.

PiperOrigin-RevId: 186502140

6 years agoAutomatically add a tf.name_scope of the function or class name as the first line...
A. Unique TensorFlower [Wed, 21 Feb 2018 20:13:48 +0000 (12:13 -0800)]
Automatically add a tf.name_scope of the function or class name as the first line of each function.  For functions inside a class, the class name is also prepended to the name scope.  Also adds a decorator param to turn this off (it defaults to True.)

PiperOrigin-RevId: 186499660

6 years agoAdds inverse_link_fn argument in regression_head. This is used in generalized regression.
A. Unique TensorFlower [Wed, 21 Feb 2018 20:00:04 +0000 (12:00 -0800)]
Adds inverse_link_fn argument in regression_head. This is used in generalized regression.

PiperOrigin-RevId: 186497656

6 years agoAdd bidirectional sequence LSTM to TFLite Ops.
A. Unique TensorFlower [Wed, 21 Feb 2018 19:59:32 +0000 (11:59 -0800)]
Add bidirectional sequence LSTM to TFLite Ops.

PiperOrigin-RevId: 186497571

6 years agoAdding support for dilated convolution.
A. Unique TensorFlower [Wed, 21 Feb 2018 19:50:59 +0000 (11:50 -0800)]
Adding support for dilated convolution.

PiperOrigin-RevId: 186496353

6 years agoTemporarily disabled part of a test that fails on MacOS
Benoit Steiner [Wed, 21 Feb 2018 19:40:05 +0000 (11:40 -0800)]
Temporarily disabled part of a test that fails on MacOS

PiperOrigin-RevId: 186494795

6 years agoFast-path for losses code.
Alexandre Passos [Wed, 21 Feb 2018 19:39:43 +0000 (11:39 -0800)]
Fast-path for losses code.

PiperOrigin-RevId: 186494736

6 years agoAdd S64 add/subtract test.
Jacques Pienaar [Wed, 21 Feb 2018 19:37:13 +0000 (11:37 -0800)]
Add S64 add/subtract test.

PiperOrigin-RevId: 186494344

6 years agoAdd link to SECURITY.md from doc describing model loading.
Mark Daoust [Wed, 21 Feb 2018 19:06:22 +0000 (11:06 -0800)]
Add link to SECURITY.md from doc describing model loading.

PiperOrigin-RevId: 186489041

6 years agoInternal change.
Jeremy Lau [Wed, 21 Feb 2018 18:57:51 +0000 (10:57 -0800)]
Internal change.

PiperOrigin-RevId: 186487354

6 years ago[XLA] Add FindInstruction and FindComputation helpers to HloTestBase.
Justin Lebar [Wed, 21 Feb 2018 18:29:47 +0000 (10:29 -0800)]
[XLA] Add FindInstruction and FindComputation helpers to HloTestBase.

These are useful for tests that create HLOs and then search for a
particular computation/instruction.

While we're at it, add a c_find_if utility and fix up the (lack of)
perfect forwarding in some of our other c_foo utilities.

PiperOrigin-RevId: 186482111

6 years agoCreate fast path for common case of finite values in CheckNumericsOp
Jeffrey A. Dean [Wed, 21 Feb 2018 17:47:58 +0000 (09:47 -0800)]
Create fast path for common case of finite values in CheckNumericsOp

PiperOrigin-RevId: 186474851

6 years agoInternal Change
A. Unique TensorFlower [Wed, 21 Feb 2018 17:35:44 +0000 (09:35 -0800)]
Internal Change

PiperOrigin-RevId: 186472818

6 years agoInternal updates.
A. Unique TensorFlower [Wed, 21 Feb 2018 17:33:41 +0000 (09:33 -0800)]
Internal updates.

PiperOrigin-RevId: 186472487

6 years agoIn the arithmetic optimizer enqueue the fanout of optimized nodes in a
Benoit Steiner [Wed, 21 Feb 2018 17:09:24 +0000 (09:09 -0800)]
In the arithmetic optimizer enqueue the fanout of optimized nodes in a
deterministic order

PiperOrigin-RevId: 186468633

6 years agomemory_size should be expressed in Bytes, but port::AvailableRam() returns kB.
Benoit Steiner [Wed, 21 Feb 2018 17:08:05 +0000 (09:08 -0800)]
memory_size should be expressed in Bytes, but port::AvailableRam() returns kB.

PiperOrigin-RevId: 186468461

6 years agofix not_covered anchor
Mark Daoust [Wed, 21 Feb 2018 17:04:00 +0000 (09:04 -0800)]
fix not_covered anchor

PiperOrigin-RevId: 186467828

6 years agoModify optimized quantized LSTM implementation so that it only needs one instantiatio...
A. Unique TensorFlower [Wed, 21 Feb 2018 16:41:26 +0000 (08:41 -0800)]
Modify optimized quantized LSTM implementation so that it only needs one instantiation of fixed-point Tanh, for 3 integer bits, regardless of the value of StateIntegerBits

PiperOrigin-RevId: 186464604

6 years agoAdding some beginner advice to the README.
A. Unique TensorFlower [Wed, 21 Feb 2018 16:13:01 +0000 (08:13 -0800)]
Adding some beginner advice to the README.

PiperOrigin-RevId: 186461145

6 years agoMinor corrections in feature_columns doc
A. Unique TensorFlower [Wed, 21 Feb 2018 14:14:29 +0000 (06:14 -0800)]
Minor corrections in feature_columns doc

PiperOrigin-RevId: 186449350

6 years ago[XLA:CPU] Add FP32<->FP16 conversion routines
Sanjoy Das [Wed, 21 Feb 2018 07:12:57 +0000 (23:12 -0800)]
[XLA:CPU] Add FP32<->FP16 conversion routines

LLVM generates calls to these functions when lowering some fp16 operations on
certain architectures.  These symbols are defined in compiler-rt but we don't
always link to compiler-rt so these symbols are sometimes absent.

This change adds __gnu_f2h_ieee and __gnu_h2f_ieee as weak symbols.  Making them
weak ensures that we are able to build successfully even when linking to a
compiler-rt that defines these symbols.

PiperOrigin-RevId: 186416684

6 years agoAdd a small test to ensure that rewrites are idempotent.
Suharsh Sivakumar [Wed, 21 Feb 2018 05:41:02 +0000 (21:41 -0800)]
Add a small test to ensure that rewrites are idempotent.

PiperOrigin-RevId: 186410356

6 years agoClarify the shape of convolution arguments.
A. Unique TensorFlower [Wed, 21 Feb 2018 04:46:26 +0000 (20:46 -0800)]
Clarify the shape of convolution arguments.

Replace n-d with size n, as n-d often means rank n, while the arguments here are arrays of size n.

PiperOrigin-RevId: 186406143

6 years agoTFLite: Define a DELEGATE op type.
Yu-Cheng Ling [Wed, 21 Feb 2018 04:34:05 +0000 (20:34 -0800)]
TFLite: Define a DELEGATE op type.
PiperOrigin-RevId: 186405366

6 years agoTFLite Conv2D: Create temporary tensors in Prepare phase.
Yu-Cheng Ling [Wed, 21 Feb 2018 03:55:06 +0000 (19:55 -0800)]
TFLite Conv2D: Create temporary tensors in Prepare phase.

PiperOrigin-RevId: 186402268

6 years ago[TF2XLA] Account for input edge of predicate.
Jacques Pienaar [Wed, 21 Feb 2018 02:56:07 +0000 (18:56 -0800)]
[TF2XLA] Account for input edge of predicate.

PiperOrigin-RevId: 186397549

6 years agoMake sure the nodes that are refered to by a collection are preserved during an
Benoit Steiner [Wed, 21 Feb 2018 02:17:46 +0000 (18:17 -0800)]
Make sure the nodes that are refered to by a collection are preserved during an
optimization

PiperOrigin-RevId: 186394467

6 years agoAutomated g4 rollback of changelist 186260342
Dustin Tran [Wed, 21 Feb 2018 02:06:02 +0000 (18:06 -0800)]
Automated g4 rollback of changelist 186260342

PiperOrigin-RevId: 186393300

6 years agoUpdate decorators transformer with additional clarifications in the tests and handlin...
A. Unique TensorFlower [Wed, 21 Feb 2018 01:40:17 +0000 (17:40 -0800)]
Update decorators transformer with additional clarifications in the tests and handling of the more rare cases when multiple decorators are applied together, as well as when decorators are used with local functions.

PiperOrigin-RevId: 186390564

6 years agoAdd a utility that generalizes getcallargs to non-function callables like constructor...
A. Unique TensorFlower [Wed, 21 Feb 2018 01:40:06 +0000 (17:40 -0800)]
Add a utility that generalizes getcallargs to non-function callables like constructors and __call__ operators.

PiperOrigin-RevId: 186390545

6 years agoFill the new `custom_initial_data(_size)?` fields in TfLiteNode.
Yu-Cheng Ling [Wed, 21 Feb 2018 01:33:16 +0000 (17:33 -0800)]
Fill the new `custom_initial_data(_size)?` fields in TfLiteNode.

PiperOrigin-RevId: 186389819

6 years ago[XLA] Emit saturating shifts on CPU, GPU and interpreter
Sanjoy Das [Wed, 21 Feb 2018 00:13:11 +0000 (16:13 -0800)]
[XLA] Emit saturating shifts on CPU, GPU and interpreter

With this change shifting out >= bitwidth for shift left and logical shift right
produces 0, and shifting out >= bitwidth for arithmetic shift right produces -1
if the LHS is negative and 0 otherwise.  Before this we were invoking undefined
behavior for these out-of-bounds shifts in LLVM and the HLO evaluator.

PiperOrigin-RevId: 186379160

6 years agoShorten grappler per-node report by default with previous behavior behind --verbose.
A. Unique TensorFlower [Tue, 20 Feb 2018 23:08:09 +0000 (15:08 -0800)]
Shorten grappler per-node report by default with previous behavior behind --verbose.

PiperOrigin-RevId: 186369380

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Tue, 20 Feb 2018 22:46:43 +0000 (14:46 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 186365924

6 years agoFix a typo in the comment (TFLite)
Yu-Cheng Ling [Tue, 20 Feb 2018 22:31:00 +0000 (14:31 -0800)]
Fix a typo in the comment (TFLite)

PiperOrigin-RevId: 186363449

6 years agoUpdate contrib/quantize docs to add description of how to use rewrites.
Suharsh Sivakumar [Tue, 20 Feb 2018 22:27:04 +0000 (14:27 -0800)]
Update contrib/quantize docs to add description of how to use rewrites.

PiperOrigin-RevId: 186362791

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Tue, 20 Feb 2018 22:18:23 +0000 (14:18 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 186361455

6 years ago[tf.data] Fix memory leak when not all elements of a `Dataset.from_generator()` are...
Derek Murray [Tue, 20 Feb 2018 22:11:35 +0000 (14:11 -0800)]
[tf.data] Fix memory leak when not all elements of a `Dataset.from_generator()` are consumed.

This change introduces a new C++ Dataset implementation
(`GeneratorDataset`) that takes three functions:

1. An initialization function that is called before the first use.
2. A "get next" function that is called to produce the elements, until a call
   raises the OutOfRange error.
3. A finalization function that is called before the iterator is destroyed.

Previously, the generator state would only be cleaned up if the caller
consumed *every* element of the generator. In the new version, the
finalization function ensures that the Python-side state of the
generator is released regardless of how the iterator is disposed.

Fixes #16163.

PiperOrigin-RevId: 186360401

6 years agoFix a memory corruption issue in boosted trees as the iterators become invalid after...
A. Unique TensorFlower [Tue, 20 Feb 2018 22:09:55 +0000 (14:09 -0800)]
Fix a memory corruption issue in boosted trees as the iterators become invalid after an Add.

PiperOrigin-RevId: 186360144

6 years agoAdd documentation to contrib/quantization to reduce confusion with contrib/quantize.
Suharsh Sivakumar [Tue, 20 Feb 2018 21:58:28 +0000 (13:58 -0800)]
Add documentation to contrib/quantization to reduce confusion with contrib/quantize.

PiperOrigin-RevId: 186358131

6 years agoBasic LogSoftmax support
A. Unique TensorFlower [Tue, 20 Feb 2018 21:57:01 +0000 (13:57 -0800)]
Basic LogSoftmax support

PiperOrigin-RevId: 186357933

6 years agoAdd an inspection helper module for related routines not found in the core inspect.
A. Unique TensorFlower [Tue, 20 Feb 2018 21:52:53 +0000 (13:52 -0800)]
Add an inspection helper module for related routines not found in the core inspect.

PiperOrigin-RevId: 186357270

6 years agoTurn on swapping heuristic by default to better manage memory usage on GPU
Benoit Steiner [Tue, 20 Feb 2018 21:47:01 +0000 (13:47 -0800)]
Turn on swapping heuristic by default to better manage memory usage on GPU

PiperOrigin-RevId: 186356358

6 years agoJava: Fix #17130
Asim Shankar [Tue, 20 Feb 2018 21:36:15 +0000 (13:36 -0800)]
Java: Fix #17130

PiperOrigin-RevId: 186354700

6 years ago[TF:XLA] Tiny fixes.
Peter Hawkins [Tue, 20 Feb 2018 21:29:53 +0000 (13:29 -0800)]
[TF:XLA] Tiny fixes.
Add missing compile-time constant input annotation to BatchToSpaceND.
Make definition of Acosh slightly more accurate. Addition/subtraction of numbers with similar magnitudes is more accurate, and x^2 likely will be further from 1.0 than x due to the doubling of the exponent caused by squaring.

PiperOrigin-RevId: 186353472

6 years agoClarify GpuDeviceInfo struct
Igor Ganichev [Tue, 20 Feb 2018 21:23:15 +0000 (13:23 -0800)]
Clarify GpuDeviceInfo struct

PiperOrigin-RevId: 186352333

6 years agoAdding Transpose to optimized_ops.
A. Unique TensorFlower [Tue, 20 Feb 2018 21:07:43 +0000 (13:07 -0800)]
Adding Transpose to optimized_ops.

PiperOrigin-RevId: 186350064

6 years agoDOCFIX: hmc.sample_chain kwarg num_steps_between_results docstring seemed to
Ian Langmore [Tue, 20 Feb 2018 21:04:51 +0000 (13:04 -0800)]
DOCFIX:  hmc.sample_chain kwarg num_steps_between_results docstring seemed to
indicate a different type of thinning than what is actually going on.
PiperOrigin-RevId: 186349630

6 years agoSimplify and enforce diagnostic ArrayDataType strings.
A. Unique TensorFlower [Tue, 20 Feb 2018 21:00:26 +0000 (13:00 -0800)]
Simplify and enforce diagnostic ArrayDataType strings.

PiperOrigin-RevId: 186348846

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Tue, 20 Feb 2018 20:46:14 +0000 (12:46 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 186346967

6 years agoMore BcastAdd benchmarks in cwise_ops_test.cc
A. Unique TensorFlower [Tue, 20 Feb 2018 20:25:33 +0000 (12:25 -0800)]
More BcastAdd benchmarks in cwise_ops_test.cc

PiperOrigin-RevId: 186344120

6 years agoMove the `maxout` layer implementation to contrib.
Francois Chollet [Tue, 20 Feb 2018 20:19:02 +0000 (12:19 -0800)]
Move the `maxout` layer implementation to contrib.

In September 2017, a contributor from GitHub added a MaxOut layer in tf.layers.
It was never added to the public API. Instead, it was only listed as part of the
API of tf.contrib.layers. This CL moves it out of tf.layers.

PiperOrigin-RevId: 186343115

6 years agoAdd Timestamp Op which returns the current timestamp during graph execution
Chris Ying [Tue, 20 Feb 2018 20:16:49 +0000 (12:16 -0800)]
Add Timestamp Op which returns the current timestamp during graph execution

PiperOrigin-RevId: 186342760

6 years ago[TF:XLA] Bump open source llvm revision to r325553
Sanjoy Das [Tue, 20 Feb 2018 19:55:57 +0000 (11:55 -0800)]
[TF:XLA] Bump open source llvm revision to r325553

PiperOrigin-RevId: 186339171

6 years agoTemporarily disable flaky test.
A. Unique TensorFlower [Tue, 20 Feb 2018 19:40:04 +0000 (11:40 -0800)]
Temporarily disable flaky test.

PiperOrigin-RevId: 186336341

6 years agoAdd numpy compatibility note to transpose operations.
Mark Daoust [Tue, 20 Feb 2018 19:13:55 +0000 (11:13 -0800)]
Add numpy compatibility note to transpose operations.

fixes #15994

PiperOrigin-RevId: 186331307

6 years agoDoc fixes for switching to 10.12.6 (Sierra) as min supported macOS
Mark Daoust [Tue, 20 Feb 2018 19:12:53 +0000 (11:12 -0800)]
Doc fixes for switching to 10.12.6 (Sierra) as min supported macOS

see: #15933
PiperOrigin-RevId: 186331121

6 years agoIntroduce tflite diff test to verify difference between tf and tf lite model
A. Unique TensorFlower [Tue, 20 Feb 2018 19:11:35 +0000 (11:11 -0800)]
Introduce tflite diff test to verify difference between tf and tf lite model

PiperOrigin-RevId: 186330891

6 years agoSupport multiple fetch nodes and add a flag for memory report.
Yao Zhang [Tue, 20 Feb 2018 19:03:08 +0000 (11:03 -0800)]
Support multiple fetch nodes and add a flag for memory report.

PiperOrigin-RevId: 186329308

6 years agoReplace private method call _ref() with read_value()
A. Unique TensorFlower [Tue, 20 Feb 2018 18:58:39 +0000 (10:58 -0800)]
Replace private method call _ref() with read_value()

PiperOrigin-RevId: 186328404

6 years agoTFLite: Check if builtin_code is in valid range by best effort.
Yu-Cheng Ling [Tue, 20 Feb 2018 18:47:06 +0000 (10:47 -0800)]
TFLite: Check if builtin_code is in valid range by best effort.
PiperOrigin-RevId: 186326496

6 years agoAdd API to switch certain parts of Graph state to be thread-local.
Igor Saprykin [Tue, 20 Feb 2018 17:34:09 +0000 (09:34 -0800)]
Add API to switch certain parts of Graph state to be thread-local.

For example, this can allow two threads to create ops under varying ops.device().

PiperOrigin-RevId: 186314978

6 years agoImplementation of `len` that uses multiple dispatch. Replaces the current blank ...
A. Unique TensorFlower [Tue, 20 Feb 2018 17:20:28 +0000 (09:20 -0800)]
Implementation of `len` that uses multiple dispatch. Replaces the current blank `tf.shape()[0]` code.

PiperOrigin-RevId: 186313178

6 years agoInternal change.
A. Unique TensorFlower [Tue, 20 Feb 2018 15:28:14 +0000 (07:28 -0800)]
Internal change.

PiperOrigin-RevId: 186300438

6 years agoAutomated g4 rollback of changelist 186260342
Dustin Tran [Tue, 20 Feb 2018 07:55:21 +0000 (23:55 -0800)]
Automated g4 rollback of changelist 186260342

PiperOrigin-RevId: 186266857

6 years agoReduce tfp.layers boilerplate via programmable docstrings.
Dustin Tran [Tue, 20 Feb 2018 05:39:03 +0000 (21:39 -0800)]
Reduce tfp.layers boilerplate via programmable docstrings.

PiperOrigin-RevId: 186260342

6 years ago[tf.data] Delete contrib version of dataset_ops.py, which was re-added by a merge...
Derek Murray [Tue, 20 Feb 2018 01:36:56 +0000 (17:36 -0800)]
[tf.data] Delete contrib version of dataset_ops.py, which was re-added by a merge from GitHub.

PiperOrigin-RevId: 186249376

6 years agoShare Variable objects among collections when importing metagraphs.
A. Unique TensorFlower [Mon, 19 Feb 2018 14:14:10 +0000 (06:14 -0800)]
Share Variable objects among collections when importing metagraphs.

This mirrors the behavior of usual graph construction where a Variable object is added to multiple collections.

PiperOrigin-RevId: 186214551

6 years agoRemove experimental C API from srcs rule as it requires other sources
A. Unique TensorFlower [Mon, 19 Feb 2018 13:54:27 +0000 (05:54 -0800)]
Remove experimental C API from srcs rule as it requires other sources

PiperOrigin-RevId: 186213207

6 years ago[TF:XLA] Select the update value instead of the buffer to support negative
Blake Hechtman [Mon, 19 Feb 2018 11:29:08 +0000 (03:29 -0800)]
[TF:XLA] Select the update value instead of the buffer to support negative
index scatter.

PiperOrigin-RevId: 186202761

6 years agoTweak `tf.slice` documentation.
A. Unique TensorFlower [Sat, 17 Feb 2018 16:42:40 +0000 (08:42 -0800)]
Tweak `tf.slice` documentation.

Add the input argument (`foo`) to `tf.slice` example so that it actually works if it were run.
Previously, the input argument was missing (perhaps implied), but the example is clearer with its inclusion.

PiperOrigin-RevId: 186105694

6 years ago[XLA:GPU] Fix a problem in DoGemmAutotune.
Bixia Zheng [Sat, 17 Feb 2018 15:46:14 +0000 (07:46 -0800)]
[XLA:GPU] Fix a problem in DoGemmAutotune.

Replace DCHECK with CHECK so that DoGemmWithAlgorithm is also called in
non-debug mode to perform autotune.

PiperOrigin-RevId: 186103809

6 years agoAutomated g4 rollback of changelist 186019263
A. Unique TensorFlower [Sat, 17 Feb 2018 12:46:24 +0000 (04:46 -0800)]
Automated g4 rollback of changelist 186019263

PiperOrigin-RevId: 186098155

6 years agoAdded an experimental C API TF_EnableXLACompilation() to enable XLA compilation.
Mingsheng Hong [Sat, 17 Feb 2018 06:05:07 +0000 (22:05 -0800)]
Added an experimental C API TF_EnableXLACompilation() to enable XLA compilation.

Also ran "buildozer warn //third_party/tensorflow/c/BUILD" and removed an unused symbol.

PiperOrigin-RevId: 186081948

6 years agoAutomated g4 rollback of changelist 186053793
Yu-Cheng Ling [Sat, 17 Feb 2018 03:02:58 +0000 (19:02 -0800)]
Automated g4 rollback of changelist 186053793

PiperOrigin-RevId: 186075274

6 years agoModify reference quantized LSTM implementation so that it only needs one instantiatio...
A. Unique TensorFlower [Sat, 17 Feb 2018 03:01:28 +0000 (19:01 -0800)]
Modify reference quantized LSTM implementation so that it only needs one instantiation of fixed-point Tanh, for 3 integer bits, regardless of the value of StateIntegerBits

PiperOrigin-RevId: 186075161

6 years agoMerge changes from github.
Ankur Taly [Sat, 17 Feb 2018 02:22:55 +0000 (18:22 -0800)]
Merge changes from github.

PiperOrigin-RevId: 186073337

6 years agoAdds a `shape` property to LabeledTensor.
A. Unique TensorFlower [Sat, 17 Feb 2018 02:18:35 +0000 (18:18 -0800)]
Adds a `shape` property to LabeledTensor.
#labeledtensor

PiperOrigin-RevId: 186073035

6 years ago[XLA] Pass the module to HloDataflowAnalysis by const reference.
Michael Kuperstein [Sat, 17 Feb 2018 02:13:53 +0000 (18:13 -0800)]
[XLA] Pass the module to HloDataflowAnalysis by const reference.

PiperOrigin-RevId: 186072673