platform/upstream/tensorflow.git
7 years agoAdd option for loop unrolling in MaskedAutoregressiveFlow bijector.
A. Unique TensorFlower [Fri, 19 Jan 2018 19:01:45 +0000 (11:01 -0800)]
Add option for loop unrolling in MaskedAutoregressiveFlow bijector.

PiperOrigin-RevId: 182559030

7 years agoFixes issue with using lookup ops in datasets from eager.
Alexandre Passos [Fri, 19 Jan 2018 18:36:05 +0000 (10:36 -0800)]
Fixes issue with using lookup ops in datasets from eager.

Addresses issue #16160

PiperOrigin-RevId: 182554969

7 years agoFixes #12466. Fix getfile in cases when .py files aren't available (only .pyc files are
Anna R [Fri, 19 Jan 2018 18:32:15 +0000 (10:32 -0800)]
Fixes #12466. Fix getfile in cases when .py files aren't available (only .pyc files are
used).

PiperOrigin-RevId: 182554325

7 years agoFix documentation typo.
A. Unique TensorFlower [Fri, 19 Jan 2018 17:53:10 +0000 (09:53 -0800)]
Fix documentation typo.

PiperOrigin-RevId: 182548006

7 years agoChange deprecated dim parameter to axis.
A. Unique TensorFlower [Fri, 19 Jan 2018 17:46:59 +0000 (09:46 -0800)]
Change deprecated dim parameter to axis.

PiperOrigin-RevId: 182547126

7 years agoImproved detection of swappable nodes
Benoit Steiner [Fri, 19 Jan 2018 17:12:34 +0000 (09:12 -0800)]
Improved detection of swappable nodes

PiperOrigin-RevId: 182542749

7 years ago[TF:XLA] Include a summary of the TF operator when TF -> XLA compilation fails.
Peter Hawkins [Fri, 19 Jan 2018 17:06:40 +0000 (09:06 -0800)]
[TF:XLA] Include a summary of the TF operator when TF -> XLA compilation fails.

PiperOrigin-RevId: 182542114

7 years agoUpdated the version of downloadable chromium's clang toolchain
Ilya Biryukov [Fri, 19 Jan 2018 11:11:14 +0000 (03:11 -0800)]
Updated the version of downloadable chromium's clang toolchain

PiperOrigin-RevId: 182511847

7 years agoFix typo in MklSubAllocator::ClearStats()
A. Unique TensorFlower [Fri, 19 Jan 2018 07:21:48 +0000 (23:21 -0800)]
Fix typo in MklSubAllocator::ClearStats()

PiperOrigin-RevId: 182492508

7 years agoSupport writing np.ndarray as tensors in Summary proto.
A. Unique TensorFlower [Fri, 19 Jan 2018 02:54:45 +0000 (18:54 -0800)]
Support writing np.ndarray as tensors in Summary proto.

PiperOrigin-RevId: 182474037

7 years agoScript to create ApiDef files automatically based on OpDef.
Anna R [Fri, 19 Jan 2018 01:16:06 +0000 (17:16 -0800)]
Script to create ApiDef files automatically based on OpDef.

PiperOrigin-RevId: 182463327

7 years agoReshaping vars correctly in _compute_fraction_of_zero.
A. Unique TensorFlower [Fri, 19 Jan 2018 01:02:02 +0000 (17:02 -0800)]
Reshaping vars correctly in _compute_fraction_of_zero.

PiperOrigin-RevId: 182461459

7 years agoAvoid use-after-free in eager tape code.
Alexandre Passos [Fri, 19 Jan 2018 00:51:40 +0000 (16:51 -0800)]
Avoid use-after-free in eager tape code.

PiperOrigin-RevId: 182460292

7 years ago[TF:XLA] Make ResizeBilinear and ResizeBilinearGrad faster for images of size 2^x+1.
A. Unique TensorFlower [Fri, 19 Jan 2018 00:20:14 +0000 (16:20 -0800)]
[TF:XLA] Make ResizeBilinear and ResizeBilinearGrad faster for images of size 2^x+1.

PiperOrigin-RevId: 182456096

7 years agoFix some (re)shaping issues.
A. Unique TensorFlower [Fri, 19 Jan 2018 00:03:32 +0000 (16:03 -0800)]
Fix some (re)shaping issues.

PiperOrigin-RevId: 182453707

7 years agoRemove extra repeat in tf.data.Dataset documentation.
A. Unique TensorFlower [Thu, 18 Jan 2018 23:50:21 +0000 (15:50 -0800)]
Remove extra repeat in tf.data.Dataset documentation.
END_PUBLIC

Unless I am missing something:

BEGIN_PUBLIC
If num_epochs is 0, this isn't needed anyway; and if num_epochs > 0 then this will be buggy, because it will cause the output dataset to repeat for more than num_epochs.

PiperOrigin-RevId: 182451811

7 years agoUpdate tensorboard dependency to minimum of 0.4.0
Nick Felt [Thu, 18 Jan 2018 23:50:16 +0000 (15:50 -0800)]
Update tensorboard dependency to minimum of 0.4.0

This should address https://github.com/tensorflow/tensorboard/issues/877.

PiperOrigin-RevId: 182451796

7 years agoHandle case when buffer_size is larger than total dataset size in shuffle dataset op.
Saurabh Saxena [Thu, 18 Jan 2018 23:27:12 +0000 (15:27 -0800)]
Handle case when buffer_size is larger than total dataset size in shuffle dataset op.
Currently ShuffleDatasetOpBase::GetNext throws a "Attempted to repeat an empty dataset infinitely." if the number of outputs produced from the dataset are < buffer_size.
Usually the buffer size is set to <= total dataset size so we never run into this.

PiperOrigin-RevId: 182448427

7 years agoEntice TensorFlow to swap data out of GPU memory sooner
Benoit Steiner [Thu, 18 Jan 2018 23:08:48 +0000 (15:08 -0800)]
Entice TensorFlow to swap data out of GPU memory sooner

PiperOrigin-RevId: 182445531

7 years agoAdd a convenient function that makes an HloProto from an HloModule.
A. Unique TensorFlower [Thu, 18 Jan 2018 22:28:45 +0000 (14:28 -0800)]
Add a convenient function that makes an HloProto from an HloModule.

PiperOrigin-RevId: 182438633

7 years agoFixed Eigen-version Conv2DBackpropInput kernel, marked with "eigen_tensor".
Sung Jin Hwang [Thu, 18 Jan 2018 22:24:50 +0000 (14:24 -0800)]
Fixed Eigen-version Conv2DBackpropInput kernel, marked with "eigen_tensor".

LaunchConv2DBackpropInputOp, a template functor class used in
Conv2DFastBackpropInputOp class was specialized in a wrong place, in
conv_grad_filter_ops.cc (ODR violation). This caused wrong functor to be called
inside the op kernel class, because the correct functor definition was overriden
by a wrong specialization. The functor class that should have been specialized
in conv_grad_filter_ops.cc was LaunchConv2DBackpropFilterOp.

PiperOrigin-RevId: 182438025

7 years agoUse snake-case name when generating @tf_export decorator in python_op_gen.cc.
Anna R [Thu, 18 Jan 2018 22:20:56 +0000 (14:20 -0800)]
Use snake-case name when generating @tf_export decorator in python_op_gen.cc.

PiperOrigin-RevId: 182437341

7 years agoMake bfloat16 work correctly with matmul
A. Unique TensorFlower [Thu, 18 Jan 2018 22:20:14 +0000 (14:20 -0800)]
Make bfloat16 work correctly with matmul

PiperOrigin-RevId: 182437226

7 years ago Adds ReduceWindow R1 test case for windows of length 128.
Tayo Oguntebi [Thu, 18 Jan 2018 22:01:07 +0000 (14:01 -0800)]
  Adds ReduceWindow R1 test case for windows of length 128.

PiperOrigin-RevId: 182433727

7 years ago[tf.data] Update API guide to include latest methods.
Derek Murray [Thu, 18 Jan 2018 21:36:52 +0000 (13:36 -0800)]
[tf.data] Update API guide to include latest methods.

PiperOrigin-RevId: 182430038

7 years agoSupports Squeeze in Tf Lite.
A. Unique TensorFlower [Thu, 18 Jan 2018 21:31:04 +0000 (13:31 -0800)]
Supports Squeeze in Tf Lite.

PiperOrigin-RevId: 182429180

7 years agoBazel rule to generate LICENSE for TFLite C library.
Yu-Cheng Ling [Thu, 18 Jan 2018 21:16:01 +0000 (13:16 -0800)]
Bazel rule to generate LICENSE for TFLite C library.

PiperOrigin-RevId: 182426880

7 years agoDon't try to swap out persistent data
Benoit Steiner [Thu, 18 Jan 2018 21:07:51 +0000 (13:07 -0800)]
Don't try to swap out persistent data

PiperOrigin-RevId: 182425781

7 years ago[TF:XLA] Bump open source llvm revision to r322850
Sanjoy Das [Thu, 18 Jan 2018 20:53:42 +0000 (12:53 -0800)]
[TF:XLA] Bump open source llvm revision to r322850

PiperOrigin-RevId: 182423651

7 years agoAdd basic class support:
A. Unique TensorFlower [Thu, 18 Jan 2018 20:50:29 +0000 (12:50 -0800)]
Add basic class support:
 * frontend API extended to allow converting an entire class
 * function conversion now supports object methods
 * responsibility for renaming the top level object is now moved up from
the call tree transformer - this is because functions may or may not be renamed based on context (e.g. object members are not renamed)
Not yet implemented:
 * static analysis and side effect protection for object fields

PiperOrigin-RevId: 182423203

7 years agoAdd tests for R2 reduce window with multiply reduction.
A. Unique TensorFlower [Thu, 18 Jan 2018 20:26:38 +0000 (12:26 -0800)]
Add tests for R2 reduce window with multiply reduction.

PiperOrigin-RevId: 182419763

7 years ago[tf.data] Further simplify the `CapturedFunction::Run*()` interfaces.
Derek Murray [Thu, 18 Jan 2018 20:18:49 +0000 (12:18 -0800)]
[tf.data] Further simplify the `CapturedFunction::Run*()` interfaces.

All users of these interfaces had to use the same boilerplate to create a
`FunctionLibraryRuntime::Options`. This change moves that boilerplate inside
the `CapturedFunction` implementation.

PiperOrigin-RevId: 182418501

7 years agoEnable a no longer flaky test.
A. Unique TensorFlower [Thu, 18 Jan 2018 19:42:09 +0000 (11:42 -0800)]
Enable a no longer flaky test.

PiperOrigin-RevId: 182412902

7 years agoTFLite iOS Makefile: Enable SSE4.1 for x86_64 build.
Yu-Cheng Ling [Thu, 18 Jan 2018 19:31:21 +0000 (11:31 -0800)]
TFLite iOS Makefile: Enable SSE4.1 for x86_64 build.
This makes the simulator slightly faster.

PiperOrigin-RevId: 182411030

7 years ago[TF:JIT] Make :xla_device visible to public, which is necessary for 3rd party
Kay Zhu [Thu, 18 Jan 2018 19:30:02 +0000 (11:30 -0800)]
[TF:JIT] Make :xla_device visible to public, which is necessary for 3rd party
to use XLA. Also add a build target to tf/compiler/plugin/BUILD that depends on
:xla_device to help ensure it stays visible to public.

PiperOrigin-RevId: 182410844

7 years agoDisable flaky test
Allen Lavoie [Thu, 18 Jan 2018 19:09:26 +0000 (11:09 -0800)]
Disable flaky test

Due to a known input function issue.

PiperOrigin-RevId: 182407471

7 years ago[TF:XLA] Add support for atrous (RHS dilated) convolutions via the "dilations" attrib...
Peter Hawkins [Thu, 18 Jan 2018 18:51:41 +0000 (10:51 -0800)]
[TF:XLA] Add support for atrous (RHS dilated) convolutions via the "dilations" attribute on convolution operators.

PiperOrigin-RevId: 182404352

7 years agoWarn against using the name RELU1 again as an op.
Andrew Selle [Thu, 18 Jan 2018 18:45:25 +0000 (10:45 -0800)]
Warn against using the name RELU1 again as an op.

PiperOrigin-RevId: 182403185

7 years ago[XLA:AOT] Emit a .o file to hold the ProgramShape protobuf
Sanjoy Das [Thu, 18 Jan 2018 18:29:39 +0000 (10:29 -0800)]
[XLA:AOT] Emit a .o file to hold the ProgramShape protobuf

This changes tfcompile to emit two .o files, one containing the TF model, and
one containing "helpers" which for now only contains the relevant
xla::ProgramShape protobuf in serialized form.
PiperOrigin-RevId: 182400539

7 years agoAdds SUM_OVER_BATCH_SIZE in losses.Reduction.
A. Unique TensorFlower [Thu, 18 Jan 2018 18:24:13 +0000 (10:24 -0800)]
Adds SUM_OVER_BATCH_SIZE in losses.Reduction.

PiperOrigin-RevId: 182399706

7 years agoAllow numpy_input_fn to take an ndarray representing a single input feature.
A. Unique TensorFlower [Thu, 18 Jan 2018 18:10:07 +0000 (10:10 -0800)]
Allow numpy_input_fn to take an ndarray representing a single input feature.

PiperOrigin-RevId: 182397583

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 18 Jan 2018 16:47:09 +0000 (08:47 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 182384458

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 18 Jan 2018 16:18:22 +0000 (08:18 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 182378232

7 years agoAdded matrix logarithm op to linear algebra ops.
A. Unique TensorFlower [Thu, 18 Jan 2018 16:10:50 +0000 (08:10 -0800)]
Added matrix logarithm op to linear algebra ops.

PiperOrigin-RevId: 182376730

7 years agoFix Markdown for examples in WarmStartSettings docstring.
A. Unique TensorFlower [Thu, 18 Jan 2018 15:27:48 +0000 (07:27 -0800)]
Fix Markdown for examples in WarmStartSettings docstring.

PiperOrigin-RevId: 182368459

7 years agoExpose Sequential as tfe.Sequential to go with the already exposed tfe.Network.
A. Unique TensorFlower [Thu, 18 Jan 2018 15:03:48 +0000 (07:03 -0800)]
Expose Sequential as tfe.Sequential to go with the already exposed tfe.Network.

PiperOrigin-RevId: 182365046

7 years agoBasic feature selection for boosted trees.
A. Unique TensorFlower [Thu, 18 Jan 2018 09:35:01 +0000 (01:35 -0800)]
Basic feature selection for boosted trees.

The idea is that we grow the trees normally until we reach the requested number of unique features, and once we reach that limit, we avoid using any new features.

PiperOrigin-RevId: 182336278

7 years ago[XLA] Add Pad to the local Python XLA client.
A. Unique TensorFlower [Thu, 18 Jan 2018 06:28:11 +0000 (22:28 -0800)]
[XLA] Add Pad to the local Python XLA client.

PiperOrigin-RevId: 182320104

7 years ago[XLA:python] Simplify frame data extraction, fix Py3 compatibility bugs.
Chris Leary [Thu, 18 Jan 2018 05:25:40 +0000 (21:25 -0800)]
[XLA:python] Simplify frame data extraction, fix Py3 compatibility bugs.

PiperOrigin-RevId: 182315965

7 years agoAdd WarmStartSettings configuration for canned Estimators.
A. Unique TensorFlower [Thu, 18 Jan 2018 05:14:42 +0000 (21:14 -0800)]
Add WarmStartSettings configuration for canned Estimators.

PiperOrigin-RevId: 182315322

7 years agoSay SQLite BLOB protos are ideally temporary
Justine Tunney [Thu, 18 Jan 2018 04:55:46 +0000 (20:55 -0800)]
Say SQLite BLOB protos are ideally temporary

We ideally want a schema that's pure SQL and doesn't embed
protos. However some protos we don't have time to translate
quite yet. So we put a BLOB as the last field so it can be
migrated later.

Please note there might end up being some things highly
specific to TensorFlow and/or Google that end up here. In
those cases we might consider keeping the proto blobs
permanently, if they're difficult to express in SQL.

PiperOrigin-RevId: 182313847

7 years agoSlightly tune the usage of ctx to be consistent with other places.
Jianwei Xie [Thu, 18 Jan 2018 02:56:27 +0000 (18:56 -0800)]
Slightly tune the usage of ctx to be consistent with other places.

PiperOrigin-RevId: 182305106

7 years agoDynamically print helper message based on user queries.
A. Unique TensorFlower [Thu, 18 Jan 2018 01:49:23 +0000 (17:49 -0800)]
Dynamically print helper message based on user queries.

PiperOrigin-RevId: 182298241

7 years agointernal change
A. Unique TensorFlower [Thu, 18 Jan 2018 01:13:03 +0000 (17:13 -0800)]
internal change

PiperOrigin-RevId: 182294233

7 years agoNicer error messages when missing filesystem.
Brennan Saeta [Thu, 18 Jan 2018 01:07:11 +0000 (17:07 -0800)]
Nicer error messages when missing filesystem.

PiperOrigin-RevId: 182293612

7 years agoAdd range encode and decode to new tensorflow contrib.
Sung Jin Hwang [Thu, 18 Jan 2018 01:05:21 +0000 (17:05 -0800)]
Add range encode and decode to new tensorflow contrib.

PiperOrigin-RevId: 182293433

7 years agoChanges the CapturedFunction implementation to not create a new FunctionLibraryRuntim...
Rohan Jain [Thu, 18 Jan 2018 00:56:14 +0000 (16:56 -0800)]
Changes the CapturedFunction implementation to not create a new FunctionLibraryRuntime etc. and just re-use the existing one provided. This allows for Dataset ops to run cross device and cross process.

PiperOrigin-RevId: 182292325

7 years ago[XLA] Add source mapping support to SWIG API.
Chris Leary [Thu, 18 Jan 2018 00:54:30 +0000 (16:54 -0800)]
[XLA] Add source mapping support to SWIG API.

PiperOrigin-RevId: 182292142

7 years agoUse explicit broadcasts in ResizeBilinear Kernel creation to make fusion easier.
Blake Hechtman [Thu, 18 Jan 2018 00:49:54 +0000 (16:49 -0800)]
Use explicit broadcasts in ResizeBilinear Kernel creation to make fusion easier.

PiperOrigin-RevId: 182291519

7 years agoUpdate contrib/all_reduce/python/all_reduce.py in consequence of
A. Unique TensorFlower [Thu, 18 Jan 2018 00:30:21 +0000 (16:30 -0800)]
Update contrib/all_reduce/python/all_reduce.py in consequence of
earlier change to nccl.broadcast function signature.

PiperOrigin-RevId: 182288943

7 years agoCombine host and device memory proto fields.
Yuefeng Zhou [Wed, 17 Jan 2018 23:58:10 +0000 (15:58 -0800)]
Combine host and device memory proto fields.

PiperOrigin-RevId: 182284426

7 years agoMake _check_bazel_version_at_least in workspace.bzl public.
Kiril Gorovoy [Wed, 17 Jan 2018 23:28:25 +0000 (15:28 -0800)]
Make _check_bazel_version_at_least in workspace.bzl public.

PiperOrigin-RevId: 182280342

7 years agoPrune away Identity nodes without regular outputs. (Addresses TODO from cl/175780178).
A. Unique TensorFlower [Wed, 17 Jan 2018 23:07:39 +0000 (15:07 -0800)]
Prune away Identity nodes without regular outputs. (Addresses TODO from cl/175780178).

PiperOrigin-RevId: 182277131

7 years agoDisabling flaky replicate_model_fn_test.py for cmake.
Amit Patankar [Wed, 17 Jan 2018 22:44:17 +0000 (14:44 -0800)]
Disabling flaky replicate_model_fn_test.py for cmake.

PiperOrigin-RevId: 182273024

7 years agoAdd functionality to auto-discover project and zone when they are not supplied to...
Frank Chen [Wed, 17 Jan 2018 22:29:30 +0000 (14:29 -0800)]
Add functionality to auto-discover project and zone when they are not supplied to the TPUClusterResolver

PiperOrigin-RevId: 182270565

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 17 Jan 2018 22:23:28 +0000 (14:23 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 182269654

7 years agoK-FAC: Fixes problem where initial eigendecomposition used by RNN classes would be...
A. Unique TensorFlower [Wed, 17 Jan 2018 21:58:05 +0000 (13:58 -0800)]
K-FAC: Fixes problem where initial eigendecomposition used by RNN classes would be computed during the call to instantiate_factors (via the "registration"  functions) instead of the call to make_inverse_update_ops.  This messed up the device placement of these ops and interacted badly with other parts of the code.

Also changed how covariance op creation is done in ConvDiagonalFactor in anticipation of similar problems in the future.

As of this CL, none of the op creation methods will modify the state of the class, and no ops will be created outside of the op creation methods.  We should try to follow this convention going forward.

PiperOrigin-RevId: 182265266

7 years agoAdd TF_GraphNumFunctions and TF_GraphGetFunctions
Igor Ganichev [Wed, 17 Jan 2018 21:46:17 +0000 (13:46 -0800)]
Add TF_GraphNumFunctions and TF_GraphGetFunctions

PiperOrigin-RevId: 182263576

7 years ago[TF:XLA] Bump open source llvm revision to r322618
Sanjoy Das [Wed, 17 Jan 2018 21:41:05 +0000 (13:41 -0800)]
[TF:XLA] Bump open source llvm revision to r322618

PiperOrigin-RevId: 182262817

7 years agoAdding support for to resolve constant FloorDiv, FloorMod, StridedSlice, Stack, Rank...
A. Unique TensorFlower [Wed, 17 Jan 2018 21:29:50 +0000 (13:29 -0800)]
Adding support for to resolve constant FloorDiv, FloorMod, StridedSlice, Stack, Rank and Range.

PiperOrigin-RevId: 182261052

7 years agoMerge changes from github.
Sourabh Bajaj [Wed, 17 Jan 2018 21:14:48 +0000 (13:14 -0800)]
Merge changes from github.

PiperOrigin-RevId: 182258809

7 years ago * Adds rank-3 ReduceWindow computation to the reference util test suite.
Tayo Oguntebi [Wed, 17 Jan 2018 20:55:00 +0000 (12:55 -0800)]
  * Adds rank-3 ReduceWindow computation to the reference util test suite.
  * Adds rank-3 test harness for ReduceWindow, along with some test cases.
  * Minor style correction.

PiperOrigin-RevId: 182256143

7 years agoMake int64 inputs workable, and testable in generate_examples_test.
Yu-Cheng Ling [Wed, 17 Jan 2018 20:28:46 +0000 (12:28 -0800)]
Make int64 inputs workable, and testable in generate_examples_test.

PiperOrigin-RevId: 182252829

7 years ago[XLA:GPU] Fix a problem in calculating the address of the memory used to
A. Unique TensorFlower [Wed, 17 Jan 2018 20:20:20 +0000 (12:20 -0800)]
[XLA:GPU] Fix a problem in calculating the address of the memory used to
implement small data type atomic operations.

To calculate the address of the enclosing 4 byte memory,
output_address&(-2) was used while it should be output_address&(-4).

Add a test case.

PiperOrigin-RevId: 182251760

7 years agoTFE: Improve spinn/README.md
Shanqing Cai [Wed, 17 Jan 2018 19:51:07 +0000 (11:51 -0800)]
TFE: Improve spinn/README.md

PiperOrigin-RevId: 182247687

7 years agoMake `replicate_model_fn` friendlier to distributed training.
Igor Saprykin [Wed, 17 Jan 2018 19:37:48 +0000 (11:37 -0800)]
Make `replicate_model_fn` friendlier to distributed training.

I verified that async distributed training works as is.  One quirk is that when replicating over a single GPU, variables end up being placed on /gpu:0 on PSs, which works correctly only thanks to allow_soft_placement=True.
For sync distributed training using SyncReplicasOptimizer the only quirk is that SyncReplicasOptimizerHook insists on SyncReplicasOptimizer.apply_gradients to be called.  That happens only in the last tower, yet any tower could create the hook.  To accommodate that requirement hooks from the last tower are taken as part of this CL. Before this, hooks from the first tower were taken.

SyncReplicasOptimizer doesn't behave perfectly in tests.  The queue keeps hanging waiting for new token to arrive until `stop_grace_period_seconds` which is set for 120 seconds.  The latter isn't exposed through the Estimator interface, which means the test is slower.

PiperOrigin-RevId: 182245657

7 years agoAdd tf.contrib.image.connected_components.
Dan Ringwalt [Wed, 17 Jan 2018 19:33:12 +0000 (11:33 -0800)]
Add tf.contrib.image.connected_components.

Comparable to scipy.ndimage.measurements.label.

PiperOrigin-RevId: 182244926

7 years agoAllow specifying the device in CreateParameterAndTransferLiteral.
Yuanzhong Xu [Wed, 17 Jan 2018 19:32:05 +0000 (11:32 -0800)]
Allow specifying the device in CreateParameterAndTransferLiteral.

PiperOrigin-RevId: 182244708

7 years agoInternal change.
A. Unique TensorFlower [Wed, 17 Jan 2018 19:05:24 +0000 (11:05 -0800)]
Internal change.

PiperOrigin-RevId: 182240175

7 years agoMake logging more accurate
A. Unique TensorFlower [Wed, 17 Jan 2018 17:55:59 +0000 (09:55 -0800)]
Make logging more accurate

PiperOrigin-RevId: 182229043

7 years agoAdds regularization_losses in canned heads.
A. Unique TensorFlower [Wed, 17 Jan 2018 17:49:03 +0000 (09:49 -0800)]
Adds regularization_losses in canned heads.

PiperOrigin-RevId: 182228149

7 years agoAdd instruction count method to HloModule.
Mark Heffernan [Wed, 17 Jan 2018 17:41:43 +0000 (09:41 -0800)]
Add instruction count method to HloModule.

PiperOrigin-RevId: 182227249

7 years agoCreate support for div and sub in tensorflow lite.
Andrew Selle [Wed, 17 Jan 2018 17:36:55 +0000 (09:36 -0800)]
Create support for div and sub in tensorflow lite.

PiperOrigin-RevId: 182226574

7 years agoexport_strategy: Add strip_default_attrs to ExportStrategy and it's export_fn signature.
A. Unique TensorFlower [Wed, 17 Jan 2018 16:22:06 +0000 (08:22 -0800)]
export_strategy: Add strip_default_attrs to ExportStrategy and it's export_fn signature.

This allows for a single place (ExportStrategy) where the config for strip_default_attrs is stored. If the export_fn callback accepts the `strip_default_attrs` argument, it can
then propagate the `strip_default_attrs` arg to estimator.export_savedmodel().

Also changed the default for `strip_default_attrs` in the ExportStrategy factory methods (saved_model_export_utils.py) to None. This allows clients that process a given ExportStrategy object to determine if a value has been provided for ExportStrategy.strip_default_attrs field (i.e., `is not None`).
If no value has been provided, those clients can then use whatever default they wish to use.

PiperOrigin-RevId: 182217376

7 years agoRename the newly introduced TF_SetAttrFunc function to make it clear that it is
A. Unique TensorFlower [Wed, 17 Jan 2018 16:11:09 +0000 (08:11 -0800)]
Rename the newly introduced TF_SetAttrFunc function to make it clear that it is
setting the attribute to a function name.  This permits future patches to add
things like TF_SetAttrFuncAttrList if necessary later.

PiperOrigin-RevId: 182216098

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