platform/upstream/tensorflow.git
7 years agoK-FAC: Expose protected functions from fisher_blocks and fisher_factors and constant...
A. Unique TensorFlower [Wed, 17 Jan 2018 13:03:05 +0000 (05:03 -0800)]
K-FAC: Expose protected functions from fisher_blocks and fisher_factors and constant strings from layer_collection in their respective library modules. This allows consistent development of blocks and factors outside tensorflow.contrib.kfac.

PiperOrigin-RevId: 182197356

7 years ago[XLA] Make the hlo_evaluator handle reduce window in the same ways as the cpu backend...
A. Unique TensorFlower [Wed, 17 Jan 2018 06:55:02 +0000 (22:55 -0800)]
[XLA] Make the hlo_evaluator handle reduce window in the same ways as the cpu backend. Also,
- Added a test that would fail without this change.
- Enabled reduce_window_test_interpreter.
- Added the DISALBED_ON_INTERPRETER macro and disalbed large tests on the interpreter.

The evaluator assumed the input value to be 0 when out of bound, which is likely to produce wrong output when the reduction function is not Add.

PiperOrigin-RevId: 182164740

7 years agoBump the size of keras:core_test as it is flakily timing out.
Gunhan Gulsoy [Wed, 17 Jan 2018 05:48:26 +0000 (21:48 -0800)]
Bump the size of keras:core_test as it is flakily timing out.

PiperOrigin-RevId: 182159937

7 years agoAutomated g4 rollback of changelist 182127737
A. Unique TensorFlower [Wed, 17 Jan 2018 04:47:19 +0000 (20:47 -0800)]
Automated g4 rollback of changelist 182127737

PiperOrigin-RevId: 182155292

7 years ago[TF:XLA] Remove workaround for b/37575001.
A. Unique TensorFlower [Wed, 17 Jan 2018 03:52:30 +0000 (19:52 -0800)]
[TF:XLA] Remove workaround for b/37575001.

The lowering bug has been long fixed, so the workaround of constructing R3s is no longer required.

PiperOrigin-RevId: 182150664

7 years agoIntroduce a new C API entrypoint to set a 'func' attribute on an op
A. Unique TensorFlower [Wed, 17 Jan 2018 03:02:15 +0000 (19:02 -0800)]
Introduce a new C API entrypoint to set a 'func' attribute on an op
description.

PiperOrigin-RevId: 182146876

7 years agoDisable exceptions in TensorFlow jsoncpp build
Justine Tunney [Wed, 17 Jan 2018 02:25:34 +0000 (18:25 -0800)]
Disable exceptions in TensorFlow jsoncpp build

This is necessary to compile with Clang. Since the TF GCP code doesn't have any
try/catch statements, this could be a bug fix.

PiperOrigin-RevId: 182143536

7 years agoMake SQLite binary smaller in TensorFlow
Justine Tunney [Wed, 17 Jan 2018 02:24:54 +0000 (18:24 -0800)]
Make SQLite binary smaller in TensorFlow

This makes it 400kB smaller. This is worth it because even
-O6 would only make SQLite 3% faster.

https://www.sqlite.org/footprint.html

PiperOrigin-RevId: 182143488

7 years agoAdd decay/epsilon/updates_collections parameters to Inception v3 arg_scope
A. Unique TensorFlower [Wed, 17 Jan 2018 02:24:39 +0000 (18:24 -0800)]
Add decay/epsilon/updates_collections parameters to Inception v3 arg_scope

PiperOrigin-RevId: 182143473

7 years agoRemove a duplicate bfloat16 registration.
A. Unique TensorFlower [Wed, 17 Jan 2018 02:20:02 +0000 (18:20 -0800)]
Remove a duplicate bfloat16 registration.

PiperOrigin-RevId: 182143007

7 years agoK-FAC: Example using tf.estimator and K-FAC.
A. Unique TensorFlower [Wed, 17 Jan 2018 01:21:12 +0000 (17:21 -0800)]
K-FAC: Example using tf.estimator and K-FAC.
- Removes FisherEstimator.inv_updates_dict. Users should create directly from
  FisherEstimator.inv_update_ops.
- Adds (cov|inv)_update_(thunks|ops) to KfacOptimizer.

PiperOrigin-RevId: 182135826

7 years agoAllow ReorderAxes to work on QUINT8 arrays. This will be necessary in order to suppor...
A. Unique TensorFlower [Wed, 17 Jan 2018 00:48:56 +0000 (16:48 -0800)]
Allow ReorderAxes to work on QUINT8 arrays. This will be necessary in order to support models that include tensorflow's DequantizeOp (such models were "quantized" using tensorflow's transform_graph tool).

PiperOrigin-RevId: 182131833

7 years agoFix flakiness of dataset_constructor_op_test and flat_map_dataset_op_test due to
Saurabh Saxena [Wed, 17 Jan 2018 00:43:13 +0000 (16:43 -0800)]
Fix flakiness of dataset_constructor_op_test and flat_map_dataset_op_test due to
timeouts.

PiperOrigin-RevId: 182131168

7 years ago[TF] Fix XLA Control Flow gradient stacks max_size creation.
Eugene Brevdo [Wed, 17 Jan 2018 00:17:36 +0000 (16:17 -0800)]
[TF] Fix XLA Control Flow gradient stacks max_size creation.

Stack creation uses tf.while_loop's maximum_iterations iff the while_loop
was created inside an XLA/TPU context.  Added several error checks to ensure
this provides useful error messages if the limited use case is not supported.

PiperOrigin-RevId: 182128135

7 years agoInternal Change.
Michael Case [Wed, 17 Jan 2018 00:14:57 +0000 (16:14 -0800)]
Internal Change.

PiperOrigin-RevId: 182127737

7 years agoIntroducing RF computation considering models with specific input resolution. Previou...
A. Unique TensorFlower [Tue, 16 Jan 2018 23:53:35 +0000 (15:53 -0800)]
Introducing RF computation considering models with specific input resolution. Previously, the input resolution was not taken into account, which led to undefined padding for many well-known models (since those rely on SAME padding, and in some cases SAME padding depends on input resolution).

This change also redesigns many aspects of the topological sorting and layer parsing functions, introducing new modules and tests.

PiperOrigin-RevId: 182124694

7 years agoEnable bfloat16 for CPU kernels
A. Unique TensorFlower [Tue, 16 Jan 2018 23:52:12 +0000 (15:52 -0800)]
Enable bfloat16 for CPU kernels

PiperOrigin-RevId: 182124532

7 years agoSwitch default `replicate_model_fn.loss_reduction` to SUM_BY_NONZERO_WEIGHTS.
Igor Saprykin [Tue, 16 Jan 2018 23:39:34 +0000 (15:39 -0800)]
Switch default `replicate_model_fn.loss_reduction` to SUM_BY_NONZERO_WEIGHTS.

Users of weighted losses need loss_reduction=SUM, otherwise the most common choice is SUM_BY_NONZERO_WEIGHTS.  Estimator class doesn't have visibility into whether weighted losses are used, so the default was assumed to be SUM, because it's correct-ish in either case.  This change sets the default to SUM_BY_NONZERO_WEIGHTS to accomodate the most common case.

PiperOrigin-RevId: 182122737

7 years agoDon't assign Tensor._shape in control_flow_ops.py
Skye Wanderman-Milne [Tue, 16 Jan 2018 23:37:05 +0000 (15:37 -0800)]
Don't assign Tensor._shape in control_flow_ops.py

I'm not totally sure why this was done to begin with. However, nothing
seems to break with it removed. I'd like to remove this since setting
_shape won't work with the C API enabled.

PiperOrigin-RevId: 182122350

7 years agoLog all valid visible cuda gpu id in one line.
Guangda Lai [Tue, 16 Jan 2018 23:33:35 +0000 (15:33 -0800)]
Log all valid visible cuda gpu id in one line.

PiperOrigin-RevId: 182121746

7 years agoExit previously entered sub-context-managers whenever any __enter__() call
A. Unique TensorFlower [Tue, 16 Jan 2018 23:19:36 +0000 (15:19 -0800)]
Exit previously entered sub-context-managers whenever any __enter__() call
throws an exception in tf.name_scope() and tf.variable_scope().

The previous conversion from generator style context managers translated a
nested with block like

    with context_a, context_b:
      yield

into the following pair of __enter__()/__exit__() methods:

    def __enter__(self):
      self.context_a.__enter__()
      self.context_b.__enter__()

    def __exit__(self, *args):
      self.context_b.__exit__(*args)
      self.context_a.__exit__(*args)
      return False

This translation is only correct when self.context_b.__enter__() does not throw
an exception. In the context of tf.name_scope() and tf.variable_scope(),
context_a is the default graph stack, and context_b is the actual scope to
enter. Entering an actual scope throws a ValueError when the scope name is
invalid. In that case, the above implementation leaves __enter__() without
popping the default graph stack. Sub-sequent calls to pop the stack will thus
fail, obscuring the actual exception that was raised in entering the scope.

PiperOrigin-RevId: 182119816

7 years agoAdjust setup to fix Tensorboard entrypoint (run_main -> main).
Russell Power [Tue, 16 Jan 2018 23:19:04 +0000 (15:19 -0800)]
Adjust setup to fix Tensorboard entrypoint (run_main -> main).

PiperOrigin-RevId: 182119760

7 years agoCheck for existence of attrs when making a `TFDecorator`.
Akshay Agrawal [Tue, 16 Jan 2018 23:18:35 +0000 (15:18 -0800)]
Check for existence of attrs when making a `TFDecorator`.

Fixes a bug that arose when the supplied target to `make_decorator` was
a callable that did not have a `__name__` member.

PiperOrigin-RevId: 182119694

7 years agoEnable saving/restoring state of ParallelMapDataset.
Saurabh Saxena [Tue, 16 Jan 2018 23:10:45 +0000 (15:10 -0800)]
Enable saving/restoring state of ParallelMapDataset.
Also actively reset input_impl_ when it is exhausted.

PiperOrigin-RevId: 182118637

7 years agoInternal Change
A. Unique TensorFlower [Tue, 16 Jan 2018 22:34:09 +0000 (14:34 -0800)]
Internal Change

PiperOrigin-RevId: 182112914

7 years agoExpose _log_and_record method to allow easier subclassing of StepCounter
Russell Power [Tue, 16 Jan 2018 22:29:15 +0000 (14:29 -0800)]
Expose _log_and_record method to allow easier subclassing of StepCounter

PiperOrigin-RevId: 182112167

7 years agoMake toco_convert work with int8 output.
A. Unique TensorFlower [Tue, 16 Jan 2018 22:27:01 +0000 (14:27 -0800)]
Make toco_convert work with int8 output.

PiperOrigin-RevId: 182111798

7 years agoAdd experimental `FunctionLibraryRuntime::InstantiateOptions::state_handle`.
Derek Murray [Tue, 16 Jan 2018 22:15:33 +0000 (14:15 -0800)]
Add experimental `FunctionLibraryRuntime::InstantiateOptions::state_handle`.

This new argument allows function instantiators to provide a unique
string that identifies the state that is associated with the
instantiated function (i.e. typically in stateful kernels).

PiperOrigin-RevId: 182110020

7 years agoDNN and Tree estimator doesn't work on GPUs. Tag the test for it to avoid running...
A. Unique TensorFlower [Tue, 16 Jan 2018 21:24:40 +0000 (13:24 -0800)]
DNN and Tree estimator doesn't work on GPUs. Tag the test for it to avoid running it with GPU config.

PiperOrigin-RevId: 182102413

7 years agoFully qualify string methods to avoid future conflicts with Abseil.
A. Unique TensorFlower [Tue, 16 Jan 2018 21:11:06 +0000 (13:11 -0800)]
Fully qualify string methods to avoid future conflicts with Abseil.

PiperOrigin-RevId: 182100616

7 years agoImproves the eager compatibility with tf.contrib.lookup.
Alexandre Passos [Tue, 16 Jan 2018 21:00:13 +0000 (13:00 -0800)]
Improves the eager compatibility with tf.contrib.lookup.

Fixes #16160

PiperOrigin-RevId: 182098964

7 years agoMake generated_examples_zip_test runnable on Android
Austin Anderson [Tue, 16 Jan 2018 20:57:03 +0000 (12:57 -0800)]
Make generated_examples_zip_test runnable on Android

PiperOrigin-RevId: 182098537

7 years agoAutomated g4 rollback of changelist 181553949
A. Unique TensorFlower [Tue, 16 Jan 2018 20:54:12 +0000 (12:54 -0800)]
Automated g4 rollback of changelist 181553949

PiperOrigin-RevId: 182098104

7 years ago[XLA] add ReduceWindow and SelectAndScatter to the local Python XLA client.
A. Unique TensorFlower [Tue, 16 Jan 2018 20:26:07 +0000 (12:26 -0800)]
[XLA] add ReduceWindow and SelectAndScatter to the local Python XLA client.

PiperOrigin-RevId: 182094260

7 years agoEnable the removal of redundant reshapes on fed models. Previously this was only...
Benoit Steiner [Tue, 16 Jan 2018 19:57:12 +0000 (11:57 -0800)]
Enable the removal of redundant reshapes on fed models. Previously this was only turned on by default for models without feed nodes.

PiperOrigin-RevId: 182090076

7 years agoRemove private Operation._input_dtypes alias.
Skye Wanderman-Milne [Tue, 16 Jan 2018 19:35:51 +0000 (11:35 -0800)]
Remove private Operation._input_dtypes alias.

This isn't necessary for anything, but it limits the surface area of
private API abuse.

PiperOrigin-RevId: 182086883

7 years agoHave _check_bazel_version_at_least compare versions as ints, not strings.
Sanjoy Das [Tue, 16 Jan 2018 19:27:45 +0000 (11:27 -0800)]
Have _check_bazel_version_at_least compare versions as ints, not strings.

This prevents issues like https://github.com/bazelbuild/bazel/issues/4425

PiperOrigin-RevId: 182085505

7 years agoUse multiple passes to improve memory since a single pass is often not enough.
Benoit Steiner [Tue, 16 Jan 2018 19:21:29 +0000 (11:21 -0800)]
Use multiple passes to improve memory since a single pass is often not enough.

PiperOrigin-RevId: 182084336

7 years agoInternal API to optionally compile a template's function into a graph function.
Akshay Agrawal [Tue, 16 Jan 2018 19:10:58 +0000 (11:10 -0800)]
Internal API to optionally compile a template's function into a graph function.

(1) Adds a function `make_template_internal` that takes an optional keyword
argument `create_graph_function_` that controls whether or not `func_` is
compiled into and executed as a graph function.

(2) Exposes `make_template_internal` as `tfe.make_template`, so users may
write something like
`
compiled = tfe.make_template("my_op", func, create_graph_function_=True)
`
to obtain a templatized version of func that is executed as a graph
function.

(3) Simplifies the implementation of (Eager)Template's _call_func and __call__
methods in a minor way.

PiperOrigin-RevId: 182082866

7 years agoMake TFLite iOS build scripts executable from anywhere.
Yu-Cheng Ling [Tue, 16 Jan 2018 18:59:43 +0000 (10:59 -0800)]
Make TFLite iOS build scripts executable from anywhere.

PiperOrigin-RevId: 182080904

7 years agoRestrict the type info analysis to avoid inference on objects created inside a contro...
A. Unique TensorFlower [Tue, 16 Jan 2018 18:07:41 +0000 (10:07 -0800)]
Restrict the type info analysis to avoid inference on objects created inside a control structure. The type of such object cannot be reliably inferred.

PiperOrigin-RevId: 182072568

7 years agoSwitch testing/... to use new test specification format
A. Unique TensorFlower [Tue, 16 Jan 2018 18:07:15 +0000 (10:07 -0800)]
Switch testing/... to use new test specification format

PiperOrigin-RevId: 182072485

7 years agoAdd one single target to bundle jar & so for TensorFlow Lite
A. Unique TensorFlower [Tue, 16 Jan 2018 18:03:00 +0000 (10:03 -0800)]
Add one single target to bundle jar & so for TensorFlow Lite

PiperOrigin-RevId: 182071549

7 years agoRemoving unused ops before applying other transformations to prevent cross input...
A. Unique TensorFlower [Tue, 16 Jan 2018 17:04:25 +0000 (09:04 -0800)]
Removing unused ops before applying other transformations to prevent cross input/output array optimizations.

PiperOrigin-RevId: 182063294

7 years agoBatchnorm returns a tuple, but when batchnorm partitioning was implemented tuple...
A. Unique TensorFlower [Tue, 16 Jan 2018 14:05:41 +0000 (06:05 -0800)]
Batchnorm returns a tuple, but when batchnorm partitioning was implemented tuple shardings were not.

PiperOrigin-RevId: 182043879

7 years agoFixes nccl_ops_test error introduced in CL 181736230.
A. Unique TensorFlower [Tue, 16 Jan 2018 13:15:00 +0000 (05:15 -0800)]
Fixes nccl_ops_test error introduced in CL 181736230.

PiperOrigin-RevId: 182039394

7 years agoDelete InputTypesTest in framework/ops_test.py
Skye Wanderman-Milne [Tue, 16 Jan 2018 07:34:10 +0000 (23:34 -0800)]
Delete InputTypesTest in framework/ops_test.py

_set_device now works with the C API enabled, so we no longer need
this explicit test coverage.

PiperOrigin-RevId: 182014804

7 years agoRaise error when unable to parse VariantTensorDataProto in BundleReader.
Saurabh Saxena [Tue, 16 Jan 2018 04:42:54 +0000 (20:42 -0800)]
Raise error when unable to parse VariantTensorDataProto in BundleReader.

PiperOrigin-RevId: 182007077

7 years ago[XLA] Remove RngBernoulli from the local Python XLA client.
Roy Frostig [Tue, 16 Jan 2018 04:09:01 +0000 (20:09 -0800)]
[XLA] Remove RngBernoulli from the local Python XLA client.

PiperOrigin-RevId: 182005780

7 years agoAvoid unloading kernels that haven't been loaded and fix replay_computation to
A. Unique TensorFlower [Tue, 16 Jan 2018 00:32:18 +0000 (16:32 -0800)]
Avoid unloading kernels that haven't been loaded and fix replay_computation to
destroy the local client instance.

Add a user defined move constructor for KernelBase to nullify the parent stream
pointer. This is needed to avoid unloading kernels that haven't been loaded
when the moved-from KernelBase objects are destructed.

Add a call to ClientLibrary::DestroyLocalInstances to destroy the local client
instance used by replay_computation.

PiperOrigin-RevId: 181995818

7 years agoMigrate `tf.contrib.data` users to the stable `tf.data` API.
Derek Murray [Mon, 15 Jan 2018 23:43:28 +0000 (15:43 -0800)]
Migrate `tf.contrib.data` users to the stable `tf.data` API.

PiperOrigin-RevId: 181993953

7 years agoFIxes non-gpu build of gpu target.
Alexandre Passos [Mon, 15 Jan 2018 17:50:17 +0000 (09:50 -0800)]
FIxes non-gpu build of gpu target.

PiperOrigin-RevId: 181976155

7 years agoFix potential use-after-free bugs in the worker with DeleteWorkerSession.
Derek Murray [Mon, 15 Jan 2018 17:31:53 +0000 (09:31 -0800)]
Fix potential use-after-free bugs in the worker with DeleteWorkerSession.

Previously, DeleteWorkerSession was responsible for freeing the
WorkerSession owned by the SessionMgr. However, it is possible for
other requests to be in-flight on the same session, and requests from
the master to be delivered out of order, which leads to the potential
for a request to use a WorkerSession after it has been freed. Revise
the SessionMgr interface to handle std::shared_ptr<WorkerSession>
instead of raw pointers to avoid this risk.

PiperOrigin-RevId: 181975078

7 years agoRemove lenient naming in tf.Saver.
A. Unique TensorFlower [Mon, 15 Jan 2018 10:22:52 +0000 (02:22 -0800)]
Remove lenient naming in tf.Saver.

PiperOrigin-RevId: 181943238

7 years agoSupport ref types as arguments to all instances of tf.contrib.lookup.LookupInterface...
RJ Ryan [Mon, 15 Jan 2018 06:32:17 +0000 (22:32 -0800)]
Support ref types as arguments to all instances of tf.contrib.lookup.LookupInterface.lookup.

PiperOrigin-RevId: 181928781

7 years agoFreezeSavedModel function: Get a frozen GraphDef, inputs, and outputs from a loaded...
Suharsh Sivakumar [Sun, 14 Jan 2018 11:38:40 +0000 (03:38 -0800)]
FreezeSavedModel function: Get a frozen GraphDef, inputs, and outputs from a loaded SaveModelBundle.

#14567

PiperOrigin-RevId: 181887870

7 years agoAdd checkpoint conversion for very old models that use the attention mechanism implem...
Alexander Gorban [Sun, 14 Jan 2018 01:23:49 +0000 (17:23 -0800)]
Add checkpoint conversion for very old models that use the attention mechanism implemented in
tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py

PiperOrigin-RevId: 181867510

7 years agoClean up the allocation logic in the interpreter.
A. Unique TensorFlower [Sun, 14 Jan 2018 00:21:55 +0000 (16:21 -0800)]
Clean up the allocation logic in the interpreter.

PiperOrigin-RevId: 181865795

7 years agoRename RELU1 to RELU_N1_TO_1 to indicate that the image of the Op is in between ...
A. Unique TensorFlower [Sat, 13 Jan 2018 23:28:01 +0000 (15:28 -0800)]
Rename RELU1 to RELU_N1_TO_1 to indicate that the image of the Op is in between -1 and 1.

PiperOrigin-RevId: 181864303

7 years agoCosmetic BFCAllocator improvements.
Justin Lebar [Sat, 13 Jan 2018 16:54:20 +0000 (08:54 -0800)]
Cosmetic BFCAllocator improvements.

- Dump a log of the allocator's internal state on allocation failure at
  vlog level 2 and above.

- When printing the allocator's chunks, print free chunks inline with
  occupied chunks.  This way fragmentation is easier to see.

- Add some GUARDED_BY annotations.

- Use a proper atomic for the "non-fatal OOM" log counter.

PiperOrigin-RevId: 181851550

7 years agoAdd support for continue / break statements. Slightly change the static analyzer...
A. Unique TensorFlower [Sat, 13 Jan 2018 14:29:02 +0000 (06:29 -0800)]
Add support for continue / break statements. Slightly change the static analyzer to better match Python semantics.

PiperOrigin-RevId: 181847178

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Sat, 13 Jan 2018 08:17:49 +0000 (00:17 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 181831552

7 years ago[Java]: Publish 1.5.0-rc1
Asim Shankar [Sat, 13 Jan 2018 08:09:09 +0000 (00:09 -0800)]
[Java]: Publish 1.5.0-rc1

PiperOrigin-RevId: 181831249

7 years ago[TF] Additional CriticalSection python wrappers.
Eugene Brevdo [Sat, 13 Jan 2018 06:22:35 +0000 (22:22 -0800)]
[TF] Additional CriticalSection python wrappers.

PiperOrigin-RevId: 181827605

7 years ago[XLA] Add some scalar tests.
A. Unique TensorFlower [Sat, 13 Jan 2018 02:43:55 +0000 (18:43 -0800)]
[XLA] Add some scalar tests.

PiperOrigin-RevId: 181819491

7 years agoFix dropout description of CudnnLSTM.
Katherine Wu [Sat, 13 Jan 2018 01:37:43 +0000 (17:37 -0800)]
Fix dropout description of CudnnLSTM.

PiperOrigin-RevId: 181814918

7 years ago[XLA:TPU] Initial HLO parser/stringifier support for sparse formats
A. Unique TensorFlower [Sat, 13 Jan 2018 01:23:45 +0000 (17:23 -0800)]
[XLA:TPU] Initial HLO parser/stringifier support for sparse formats

- Add methods for manipulating sparse literals to xla::Literal

- Make LayoutUtil::HumanString handle sparse layouts

- Make ShapeUtil::ParseShape handle sparse shapes

- Syntax for shapes has changed:

  - Old way of expressing layouts still works, e.g. f32[1,2,3]{2,1,0}

  - Can now make dense format explicit: f32[1,2,3]dense{2,1,0}

  - Can express sparse layouts; the max_sparse_elements value is in the
    braces, e.g.: f32[1,2,3]sparse{10}

  - The shape should not include braces for the layout if the shape is scalar;
    e.g. f32[]{} is not valid shape syntax.

  - The shape should not include braces for the layout if the shape is a dense
    rank-1 array; e.g. f32[10]{0} is not valid shape syntax

  - Sparse literals use a dictionary-liky syntax, e.g.:
    f32[2,3,4]sparse{10} {[0,1,2]: 10, [1,2,3]: 11}

  - For rank-1 sparse arrays, the square brackets around indices may be omitted, e.g.:
    f32[100]sparse{10} {5: 10, 20: 30}

PiperOrigin-RevId: 181813837

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Sat, 13 Jan 2018 00:48:25 +0000 (16:48 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 181810382

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Sat, 13 Jan 2018 00:42:33 +0000 (16:42 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 181809677

7 years agoImmutable differentiable tf lists.
Alexandre Passos [Fri, 12 Jan 2018 23:49:43 +0000 (15:49 -0800)]
Immutable differentiable tf lists.

This implements just the basic operations for pushing, popping, stacking, and unstacking. Operations to create an empty list of a known size and to set / get individual elements by index forthcoming.

PiperOrigin-RevId: 181803880

7 years agoMove TPU configuration ops to run on the TPU_SYSTEM device.
A. Unique TensorFlower [Fri, 12 Jan 2018 23:33:25 +0000 (15:33 -0800)]
Move TPU configuration ops to run on the TPU_SYSTEM device.

PiperOrigin-RevId: 181802067

7 years agoTFTS: Stop abusing _shape in unit tests
Allen Lavoie [Fri, 12 Jan 2018 23:15:37 +0000 (15:15 -0800)]
TFTS: Stop abusing _shape in unit tests

PiperOrigin-RevId: 181800015

7 years agoDetect if the issue is from underlying tracing or tfprof.
A. Unique TensorFlower [Fri, 12 Jan 2018 23:07:24 +0000 (15:07 -0800)]
Detect if the issue is from underlying tracing or tfprof.

PiperOrigin-RevId: 181798974

7 years ago* Fix bug introduced in cl/181043095: We need to update the nodemap when adding contr...
A. Unique TensorFlower [Fri, 12 Jan 2018 23:07:24 +0000 (15:07 -0800)]
* Fix bug introduced in cl/181043095: We need to update the nodemap when adding control dependencies.
* Fix a bug in ConstantFolding::AddControlDependency: Don't create the same Identity node after Switch multiple times. Just re-use if it already exists.
* Make sure that nodes added in rewrites have unique names.
* A few minor cleanups.

PiperOrigin-RevId: 181798973

7 years agoRaise the same error for uninitialized ResourceVariables as we do for Variables.
Alexandre Passos [Fri, 12 Jan 2018 22:54:59 +0000 (14:54 -0800)]
Raise the same error for uninitialized ResourceVariables as we do for Variables.

PiperOrigin-RevId: 181797089

7 years agoReorganize the shared batching scheduler headers, leaving forwarding shims.
Alexandre Passos [Fri, 12 Jan 2018 22:46:20 +0000 (14:46 -0800)]
Reorganize the shared batching scheduler headers, leaving forwarding shims.

PiperOrigin-RevId: 181795909

7 years agoClarify the _slice_helper (Tensor.__getitem__) docs.
Dan Ringwalt [Fri, 12 Jan 2018 21:47:29 +0000 (13:47 -0800)]
Clarify the _slice_helper (Tensor.__getitem__) docs.

Scalar tensors are allowed.

PiperOrigin-RevId: 181787643

7 years ago * Enable bfloat16 testing for DynamiscSlice and DynamicUpdateSlice.
Bjarke Hammersholt Roune [Fri, 12 Jan 2018 21:25:07 +0000 (13:25 -0800)]
 * Enable bfloat16 testing for DynamiscSlice and DynamicUpdateSlice.
 * Make bfloat16's conversion constructors non-explicit, so that bfloat16 is consistent
     with a built-in type. This was useful in some of the templated tests.
 * Give bfloat16 prefix and suffix operator++ and operator--, making it more like float,
     which has these. This also came up in a templated test.

PiperOrigin-RevId: 181784644

7 years agotfprof support for eager.
A. Unique TensorFlower [Fri, 12 Jan 2018 21:20:27 +0000 (13:20 -0800)]
tfprof support for eager.

PiperOrigin-RevId: 181784078

7 years ago[TF:XLA] Bump open source llvm revision to r322231
Sanjoy Das [Fri, 12 Jan 2018 20:30:57 +0000 (12:30 -0800)]
[TF:XLA] Bump open source llvm revision to r322231

PiperOrigin-RevId: 181777970

7 years agoFix integer learning phase setting in Keras.
Francois Chollet [Fri, 12 Jan 2018 20:28:32 +0000 (12:28 -0800)]
Fix integer learning phase setting in Keras.

PiperOrigin-RevId: 181777677

7 years agoAdd _HostSend and _HostRecv to grappler
A. Unique TensorFlower [Fri, 12 Jan 2018 20:00:29 +0000 (12:00 -0800)]
Add _HostSend and _HostRecv to grappler

PiperOrigin-RevId: 181774069

7 years agoMake it clear that the DeviceAssignment passed to an execution is immutable.
A. Unique TensorFlower [Fri, 12 Jan 2018 20:00:29 +0000 (12:00 -0800)]
Make it clear that the DeviceAssignment passed to an execution is immutable.

PiperOrigin-RevId: 181774067

7 years agofixes _softmax function so that nn.softmax(...) and nn.log_softmax(...) can accept...
Olivia Nordquist [Fri, 12 Jan 2018 19:38:34 +0000 (11:38 -0800)]
fixes _softmax function so that nn.softmax(...) and nn.log_softmax(...) can accept negative axes that aren't -1 as the documentation claims. _swap() was accepting negative indices when math_ops.range() does not accept negative indices

PiperOrigin-RevId: 181771157

7 years agoInitialize context handle before enable_run_metadata.
A. Unique TensorFlower [Fri, 12 Jan 2018 19:36:49 +0000 (11:36 -0800)]
Initialize context handle before enable_run_metadata.

PiperOrigin-RevId: 181770918

7 years agoUpdating the docker login command. The email flag is deprecated.
Amit Patankar [Fri, 12 Jan 2018 19:29:11 +0000 (11:29 -0800)]
Updating the docker login command. The email flag is deprecated.

PiperOrigin-RevId: 181769938

7 years agoAdds some logging around model creation.
A. Unique TensorFlower [Fri, 12 Jan 2018 19:23:04 +0000 (11:23 -0800)]
Adds some logging around model creation.

When debugging slow startups, it is useful to be able to determine the following, and I which I was not able to get from the current logging:
  - When, and how long, model construction happens with Estimator
  - When, and how long, the init op takes

PiperOrigin-RevId: 181768945

7 years agoSmall bug fix visualize.
Andrew Selle [Fri, 12 Jan 2018 18:58:07 +0000 (10:58 -0800)]
Small bug fix visualize.

PiperOrigin-RevId: 181765083

7 years ago[tf.data] Update docstrings to point to `tf.data.Dataset.apply()`.
Derek Murray [Fri, 12 Jan 2018 18:31:12 +0000 (10:31 -0800)]
[tf.data] Update docstrings to point to `tf.data.Dataset.apply()`.

PiperOrigin-RevId: 181761270

7 years agoAdd python script that can visualize models by producing an HTML page.
Andrew Selle [Fri, 12 Jan 2018 17:57:25 +0000 (09:57 -0800)]
Add python script that can visualize models by producing an HTML page.

PiperOrigin-RevId: 181756421

7 years agoEnable passing CSE consider_fn through GraphOptimizer::Optimize call.
Jacques Pienaar [Fri, 12 Jan 2018 17:56:28 +0000 (09:56 -0800)]
Enable passing CSE consider_fn through GraphOptimizer::Optimize call.

PiperOrigin-RevId: 181756325

7 years agoMade Dataset as a main reference for input_fn preparation.
Mustafa Ispir [Fri, 12 Jan 2018 17:52:01 +0000 (09:52 -0800)]
Made Dataset as a main reference for input_fn preparation.

PiperOrigin-RevId: 181755864

7 years ago[TFXLA] Don't rely on CSE to dedup args.
Jacques Pienaar [Fri, 12 Jan 2018 17:18:33 +0000 (09:18 -0800)]
[TFXLA] Don't rely on CSE to dedup args.

Handle the case where a value is fed in via multiple switch nodes without relying on CSE to dedup the nodes as we'd only want/need to feed in the same value once per function.

PiperOrigin-RevId: 181752351

7 years agoFormatting fixes
Mark Daoust [Fri, 12 Jan 2018 16:44:43 +0000 (08:44 -0800)]
Formatting fixes

PiperOrigin-RevId: 181748699

7 years agoUpdate Eigen to 14e1418fcf12985861f17131e6de94adb4c7b630.
RJ Ryan [Fri, 12 Jan 2018 16:38:39 +0000 (08:38 -0800)]
Update Eigen to 14e1418fcf12985861f17131e6de94adb4c7b630.

Fixes Eigen TensorFFT precision issues due to twiddle factor calculation via recurrence:
https://bitbucket.org/eigen/eigen/commits/6c74460b39d4c3e2e570dbe9e82497cac3800e57

PiperOrigin-RevId: 181748118

7 years agoGenerate more numerically stable random inputs.
Blake Hechtman [Fri, 12 Jan 2018 16:24:05 +0000 (08:24 -0800)]
Generate more numerically stable random inputs.

PiperOrigin-RevId: 181746741

7 years agoMoves CUDA-only condition of NCCL further up to dependent targets.
A. Unique TensorFlower [Fri, 12 Jan 2018 14:15:05 +0000 (06:15 -0800)]
Moves CUDA-only condition of NCCL further up to dependent targets.
Removes NCCL kernel registration in non-CUDA builds (but retains NCCL ops).
Removes unused python/ops/_nccl_ops.so target.

PiperOrigin-RevId: 181736230

7 years agoAdjust feature name in `features` field of generic tree proto for Sparse Float Features
A. Unique TensorFlower [Fri, 12 Jan 2018 08:24:57 +0000 (00:24 -0800)]
Adjust feature name in `features` field of generic tree proto for Sparse Float Features

PiperOrigin-RevId: 181712201

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Fri, 12 Jan 2018 04:17:58 +0000 (20:17 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 181698744

7 years agoAvoid creating swap nodes multiple times if the memory optimizer is run more
Benoit Steiner [Fri, 12 Jan 2018 03:24:20 +0000 (19:24 -0800)]
Avoid creating swap nodes multiple times if the memory optimizer is run more
than once.

PiperOrigin-RevId: 181695508