END_PUBLIC --- Commitd77b99809authored by Yong Tang<yong.tang.github@outlook.com> Committed by gunan<gunan@google.com>: Update docs for `begin_params_axis` (#13979) This fix fixes the issue raised in 13975 where `begin_shift_axis` is actually `begin_params_axis`. This fix fixes 13975. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commite6a242b4eauthored by Yifei Feng<fengyifei2026@gmail.com> Committed by gunan<gunan@google.com>: Add GCC/Compiler version to issue template. (#14113) As suggested in #13930 --- Commit7ece1c0b8authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Moving model_pruning library to tf.contrib PiperOrigin-RevId: 174214419 --- Commit693325c83authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Log the full traceback in Coordinator.request_stop if it's available PiperOrigin-RevId: 174213375 --- Commit6c4a769abauthored by Mark Daoust<markdaoust@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Delete duplicate label_image script. The version in examples/label_image is more complete (with image size and normalization options), so it can be used with `mobilenets`. Also: removed bazel from main tutorial instructions. PiperOrigin-RevId: 174212674 --- Commit7a5b81c29authored by Yao Zhang<yaozhang@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Materialize shape for ShapeN. PiperOrigin-RevId: 174211500 --- Commit78041b1ddauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: internal change PiperOrigin-RevId: 174211190 --- Commit2118fcf62authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: BUILD cleanup in contrib/tensor_forest/... PiperOrigin-RevId: 174201884 --- Commit6849ef8f6authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: internal change. PiperOrigin-RevId: 174197506 --- Commit37370d98fauthored by resec<resec0109@gmail.com> Committed by gunan<gunan@google.com>: Support more Android arch in Makefile build (#12806) * Support more Android arch in Makefile build * update Makefile * fix MARCH_OPTION * persist multiple architectures across builds * persist multiple architectures across builds * persist multiple architectures across builds * persistence bug fix * persistence bug fix * persistence bug fix * add -latomic to linker flags for benchmark * Change ANDROID_OS_ARCH to ANDROID_HOST_OS_ARCH --- Commitc40d54173authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Exposes recall_at_top_k under tf.metrics. PiperOrigin-RevId: 174189641 --- Commit18bf5b2d9authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Return a classifier score of the same type as the logits. PiperOrigin-RevId: 174184871 --- Commit9da02be11authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Make 'collections' a list, as documented and expected by downstream custom getters. PiperOrigin-RevId: 174184867 --- Commit16b0bb095authored by loki der quaeler<quaeler@users.noreply.github.com> Committed by gunan<gunan@google.com>: Adding a feed for boolean tensors to TensorFlowInferenceInterface (#14059) * Sublime Text index-ignore file (a copy of .gitignore) * Adding the requested implementation to TensorFlowInferenceInterface * Removing Sublime Text .ignore file from remote repository * indeed there was --- Commitfa9d8aab4authored by Urs K?ster<ursk@users.noreply.github.com> Committed by gunan<gunan@google.com>: Add 'log_progress' argument for tf.estimator.Estimator's evaluate function (#13695) * Add argument for tf.estimator.Estimator's evaluate function * add log_progress argument to ._convert_eval_steps_to_hooks for TPU estimator * log only every 10th step if more than 100 iterations in _StopAfterNEvalsHook * ensure last step is logged and aim for 10 outputs total --- Commit07a91dac5authored by nolan liu<nolan.liou@gmail.com> Committed by gunan<gunan@google.com>: make `gather` cpu kernel to be multiple threads. (#12246) * Change the gather op to multi-thread. * Modify the gather kernel of xla compiler in order to be compatible with multi-threads cpu kernel. * Add prefetch logic to gather op kernel. * Update the indention of gather op kernel code. * Update the gather kernel code for multiple thread. * Remove reference to ealier version of code in gather functor. * Change the framework_lite dep of gather_functor to framework. * Remove mutex guard in gather functor. --- Commita956486beauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Remove an erronous __attribute__((...)) tag. There is no __attribute__((guarded)) or __attribute__((pt_guarded)) attribute in Clang, and if we turn on warnings for unknown attributes (which are currently turned off), this causes build failures. This means that, when the warnings are turned off, this is simply a no-op. PiperOrigin-RevId: 174134252 --- Commit27412f3b6authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add compiler/tf2xla/sharding_util.h with utilities for getting the core device from a Node. PiperOrigin-RevId: 174133602 --- Commitab4349a26authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: BUILD cleanup in selected packages in contrib/... PiperOrigin-RevId: 174115744 --- Commit4aa90bfd3authored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA] Add HLO matchers that check parameter numbers and GTE indices. This lets you do EXPECT_THAT(foo, op::Parameter(42)); and EXPECT_THAT(bar, op::GetTupleElement(baz, 8)); PiperOrigin-RevId: 174113597 --- Commitf97e7c69bauthored by Olivia Nordquist<nolivia@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: partially exposing the _set_attr and _get_attr method in python PiperOrigin-RevId: 174113043 --- Commit8e732a312authored by Artem Belevich<tra@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Prefer cubin over PTX when we launch CUDA kernels. Native GPU code, if we have it, should be preferred over JIT compilation of PTX. PiperOrigin-RevId: 174110646 --- Commit2ccf3aba4authored by Eugene Brevdo<ebrevdo@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Permanently remove several modules from tf.contrib.bayesflow. These modules are very infrequently used and will not be developed moving forward. Removing this code paves the way for remaining modules in tf.contrib.bayesflow to move to their own repo. PiperOrigin-RevId: 174110067 --- Commitef7052fbdauthored by Andrew Selle<aselle@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Open source build support for TensorFlow Lite Toco. - Handle proto incompatibilities - Mixed bazel compatibility fixes. - Add link to absl libraries PiperOrigin-RevId: 174103981 --- Commitd6a9cd40cauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix "hides overloaded virtual function" error in default/gpu_tracer.cc when compiled with -Werror,-Woverloaded-virtual. PiperOrigin-RevId: 174101519 --- Commitb242a7988authored by Mustafa Ispir<ispir@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Set metric variable initializers as lambda. PiperOrigin-RevId: 174100686 --- Commit57b1c5621authored by Alan Yee<alyee@ucsd.edu> Committed by drpngx<drpngx@users.noreply.github.com>: Add deprecation notes (#12614) * Update lookup_ops.py Minor comment fix * Update metrics_ops.py Add deprecated notes * Update tensor_util.py Update deprecated note on remove_squeezable_dimensions * Update metric_ops.py Add deprecated notes --- Commit453dd5848authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: K-FAC: Support for tf.AUTO_REUSE when re-using registrations. Multi-tower support for FullFB, NaiveDiagonalFB. Removal of LayerCollection.generic_registrations. PiperOrigin-RevId: 174092003 --- Commit0a7be5a2fauthored by Sanjoy Das<sanjoy@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Rename (Add|Get)ProfileResult to something more specific; NFC PiperOrigin-RevId: 174084570 --- Commitf1916f8f6authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: - Remove slice hack to properly initialize missing entries in weight matrices - Add real support for EmbeddingColumns / input_layer() - Fix warmstarting for non-PartitionedVariables PiperOrigin-RevId: 174083777 --- Commitf567ddf87authored by Alex Sergeev<alexander.sergeev@live.com> Committed by drpngx<drpngx@users.noreply.github.com>: Add tf.sysconfig.get_compile_flags() & tf.sysconfig.get_link_flags() for custom operators (#13496) * Add flags for custom op compilation * Move ABI logic into version_info.cc * Add #include <string> to be able to read _GLIBCXX_USE_CXX11_ABI value. * Make flags to be lists * Add _flag to cxx11_abi * Address review comment. * Move CXX import to the top level. * Add goldens update --- Commit0cddb9bcaauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 174074499 --- Commitba8c38959authored by Neal Wu<wun@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Change wide_deep.md and wide.md to reference the TensorFlow official models version rather than the tf.contrib.learn version PiperOrigin-RevId: 174074112 --- Commitf3006422cauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Make `RunTrainOpsHook` public. PiperOrigin-RevId: 174073925 --- Commit21dafd6d2authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update ops-related pbtxt files. PiperOrigin-RevId: 174073569 --- Commit66fc99a3bauthored by Artem Belevich<tra@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA:GPU] Short-circuit compilation of no-op IR -> empty PTX. There's no point constructing/running LLVM pipeline if we know that we have no kernels in the IR we've generated for the given HLO op. This is often the case for ops we can optimize away at the HLO level. PiperOrigin-RevId: 174072540 --- Commitc911d0f16authored by Dhananjay Nakrani<dhananjayn@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Switch over python calls to RandomPoissonV2. Part 2 of Support int32/64 in tf.random_poisson(). PiperOrigin-RevId: 174071745 --- Commitb5d5326c6authored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA:GPU] Fix race condition in gpu_compiler.cc. We were racing on libdevice_dir_. PiperOrigin-RevId: 174070334 --- Commit35939d2d3authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Fix string to HLO opcode conversion for atan2, complex, imag and real. Make sure that we can't forget opcodes by auto-generating the conversion functions. Add auto-generated functions to test HLOs for properties (like IsVariadic, IsComparison, etc.) This makes changing HLO more robust and easier because there are fewer places to update when adding or removing an HLO opcode. Also: * Fix IsElementwiseBinary for atan2. * Add a unit test for HLO opcode helpers. * Express IsElementwiseBinary in terms of IsElementwise() and operand_count() to avoid having to keep the two in sync manually. PiperOrigin-RevId: 174069664 --- Commit3b845c80dauthored by Allen Lavoie<allenl@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Disable resnet50_graph_test under TSAN due to timeouts. PiperOrigin-RevId: 174066937 --- Commit8a09bbc4aauthored by Igor Ganichev<iga@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add TFE_Py_TensorShapeSlice function TFE_Py_TensorShapeSlice takes a list of EagerTensors and returns a list of their i'th dimensions. This utility is fairly niche but it is simple and reduces SPINN training time by over 12%. PiperOrigin-RevId: 174065044 --- Commit585432cc2authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Refactor ArgMin / ArgMax index ops as XlaHelpers. PiperOrigin-RevId: 174061370 --- Commite6faa845cauthored by Michael Case<mikecase@chromium.org> Committed by gunan<gunan@google.com>: Merge v1.4-rc1 back into master branch. (#13960) * Update RELEASE NOTES for TensorFlow 1.4 * Update the version strings for TF 1.4-rc0. * Update version strings in POM files missed by update script. * Pin TensorBoard 0.4 to TensorFlow 1.4 * Fixing the name of the disabled test. (#13592) * Revert "Implementing ghost batch norm as defined in https://arxiv.org/pdf/1705.08741." This reverts commit125f7afa4a. * Disable iterator_ops_test on Windows for 1.4 release (#13609) * Disable failing Windows tests for r1.4 release. testRemoteIteratorUsingRemoteCallOpDirectSessionGPUCPU test is failing with "TypeError: only integer scalar arrays can be converted to a scalar index" on the Windows GPU Release bot. Disabling test. * Fix typo. * Also disalbe iterator_ops_test from contrib/. * Add contributing authors to 1.4 Release notes. Thanks! * Fixes to authors. Removed duplicate and removed googler from contributing author list. * Fixes and additions to release notes. Added line about Keras moving into core. Added line about CUDA/cuDNN versions. Added line about custom ops. * Fixing a master regression (#13562) * Update version strings for 1.4.0rc1 * Remaining cherry-picks for 1.4.0rc1 (#13700) * Java: Tweak to address some Javadoc errors. PiperOrigin-RevId: 171987329 * Fix S3 BUILD not including files explicitly. This causes remote builds to fail since they AWS headers were missing. PiperOrigin-RevId: 171718021 * Add missing default config setting in aws.BUILD (#13662) * Remove setting AWS logging for S3 file system. Was causing issues with tests. Can repro test failures on Macs by running... bazel test --config=s3 --cache_test_results=no --test_output=streamed //tensorflow/core/kernels:control_flow_ops_test Possible reason for error is symbol collision with AWS logging code. One possible solution would be to split out another shared object for the S3 filesystem op which does not link in libtensorflow_framework.so. This is done, for example, by libforestprotos.so in tensorflow/contrib/tensor_forest/BUILD PiperOrigin-RevId: 171246381 * Relanding change to add config to enable S3 file system support. Pass --config=s3 argument to Bazel to build with S3 file system support. Change was originally rolled back due to a failure it caused in //tensorflow/core/kernels:control_flow_ops_test on Macs which is now fixed. PiperOrigin-RevId: 171579378 * Update release notes about Amazon S3 file system support being default. * Add documentation to sloppy_interleave function PiperOrigin-RevId: 171303413 * Add `cudnn_rnn_ops` to the Windows build Fixes #13696. * Creating a patch for the wrong links that still point to dev. (#13753) * tfdbg release notes in r1.4 * Fix ambiguous type comparison in s3_crypto.cc (#13758) tensorflow/contrib/s3/s3_crypto.cc(74): error C2666: 'std::fpos<_Mbstatet>::operator ==': 3 overloads have similar conversions could be 'bool std::fpos<_Mbstatet>::operator ==(std::streamoff) const' or 'bool std::fpos<_Mbstatet>::operator ==(const std::fpos<_Mbstatet> &) We were seeing this compilation error on Windows builds. * Set estimator run_config default random seed to None. This will make it aligned with other parts of the TF. Many users are not aware of impact of non-random seed. For example it may lead to train only on a small fraction of training data due to preemptions. We're changing default behavior since we consider it as a bug fix. PiperOrigin-RevId: 172519268 * Move global_step_read dependency to model_fn instead of input_fn. PiperOrigin-RevId: 172366972 * [tf.data] Fix broken implementation of `Dataset.from_generator()` on Windows. Due to a mix-up between NumPy's default array element type for a Python `int` on Windows and Linux, a tf.py_func() in `Dataset.from_generator()` would appear to return the wrong type on Windows (np.int32 instead of np.int64). All code using `Dataset.from_generator()` on Windows was previously broken. This change fixes both `tf.data.Dataset.from_generator()` and `tf.contrib.data.Dataset.from_generator()`. It also enables test coverage for this method on Windows, which should prevent future breakage. PiperOrigin-RevId: 172346533 * Update RELEASE notes for change to run_config random seed. * Disable probable timeout flake on Ubuntu machines. PiperOrigin-RevId: 172408922 * Disabling failing contrib tests. * Disable S3 on Windows due to build issues. * Update serving_input_fn argument name to serving_input_receiver_fn PiperOrigin-RevId: 172787460 * Update the C++ API guide (#13858) - Adds the standard warning at the top that people may want the master branch - Includes a documentation fix for 1.4 (cc_binary -> tf_cc_binary to avoid undefined symbols). * Add known Dataset issue to RELEASE.md. (#13870) Adding info about issue using Unicode strings with Datasets. * Fixes to merge. * Fix spelling of tensorflow in install_sources.md --- Commit6eac524efauthored by cglewis<clewis@iqt.org> Committed by cglewis<clewis@iqt.org>: Use 'LABEL maintainer=' in Dockerfile * Use 'LABEL maintainer=' in Dockerfile This fix is a follow up of 13961 to replace `MAINTAINER` with `LABEL maintainer=` in Dockerfile. The keyword `MAINTAINER` has long been deprecated and is replaced by `LABEL`, which is much more flexible and is easily searchable through `docker inspect`. This fix replaces remaining `MAINTAINER` with `LABEL`. Signed-off-by: Charlie Lewis <clewis@iqt.org> * Additional `MAITAINER` -> `LABEL` Signed-off-by: Charlie Lewis <clewis@iqt.org> --- Commit469970260authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Modify quantization to support add ops that occur after Conv2D PiperOrigin-RevId: 174058697 --- Commit938643b56authored by Amit Patankar<amitpatankar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Replace the docker check with an OS check. PiperOrigin-RevId: 174057778 --- Commit5f1a66ccbauthored by Igor Saprykin<isaprykin@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add more recovery functionality to MonitoredSession.run_step_fn. Current implemention wouldn't recover from one of `_PREEMPTION_ERRORS` during a fetch through the raw session that is made available to the step_fn. The changelist presents a way to map the desired functionality to the hiearchy of _MonitoredSession > (possibly!) _RecoverableSession > _CoordinatedSession > _HookedSession. PiperOrigin-RevId: 174053865 --- Commit9a2b0983aauthored by Yifei Feng<fengyifei2026@gmail.com> Committed by gunan<gunan@google.com>: Add apt-key for ubuntu keyserver (#14114) --- Commit479ee24a0authored by Asim Shankar<asimshankar@gmail.com> Committed by gunan<gunan@google.com>: eager: Update broken link in README (#14136) --- Commitad7bb2b9eauthored by Asim Shankar<asimshankar@gmail.com> Committed by gunan<gunan@google.com>: eager: Update broken links in guide.md (#14135) --- Commitc37ebf0d5authored by Thomas Deegan<tadeegan@gmail.com> Committed by gunan<gunan@google.com>: Resolve //tensorflow relative to tensorflow repo so that tfcompile.bzl can be correctly loaded from another Bazel project (#14103) --- Commitb2ff3ad96authored by Mustafa Ispir<ispir@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Added GraphKeys.METRIC_VARIABLE collection. Added all variables under tf.metrics and tf.contrib.metrics into this collection. This will enable replication of model for evaluation. When we replicate a metric in multiple towers (let's say for each qpu we replicate same model/metric), we cannot reduce the output of metrics. On the other hand internal state (local-variables) of those metrics can reducible via sum. PiperOrigin-RevId: 174051559 --- Commit98dad195dauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds sigmoid to the list of operations that can be recomputed. PiperOrigin-RevId: 174047825 --- Commit123749fb1authored by Yuan (Terry) Tang<terrytangyuan@users.noreply.github.com> Committed by Martin Wicke<martin.wicke@gmail.com>: Remove Scikit Flow link and description (#14036) --- Commit0d118e4dcauthored by Benoit Steiner<bsteiner@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Implemented tensorflow::port::NominalCPUFrequency() PiperOrigin-RevId: 174041196 --- Commit648993e82authored by Andrew Harp<andrew.harp@gmail.com> Committed by Andrew Harp<andrew.harp@gmail.com>: delete extraneous file --- Commitc2ff8a5abauthored by Mark Daoust<markdaoust@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Delete backticks PiperOrigin-RevId: 174030921 --- Commit333ba224dauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Dependency information for Skylark macros PiperOrigin-RevId: 174023371 --- Commit9ee0cececauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Shrink the model size for unit test. PiperOrigin-RevId: 174001263 --- Commitc44f67a7eauthored by Yifei Feng<fengyifei2026@gmail.com> Committed by gunan<gunan@google.com>: Disable clang_format check. (#14115) Different clang_format version can cause different formats with the same style option. This check might be too strict. Disable for now. --- Commita6a618843authored by Asim Shankar<ashankar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: eager: Documentation and example models. - Updated README - A preliminary "User's Guide" - A few example models, some with benchmarks PiperOrigin-RevId: 173996303 --- Commitde38e5dffauthored by ???<dev@goodow.com> Committed by GitHub<noreply@github.com>: fix broken link --- Commitcd81bc8e0authored by Rohan Jain<rohanj@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds a PrefetchWithFn op to contrib/data. Alongwith the FunctionBufferingResource, this can be used to prefetch and fill up a buffer by making repeated function calls. Also fixes a TODO in the ProcessFLR implementation to respect alloc_attrs for Rendezvous calls. PiperOrigin-RevId: 173990680 --- Commit17695212cauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Don't pass HLO operands in HandleAtan2. This makes it consistent with the rest of the Visit methods where we only pass the HLO itself. PiperOrigin-RevId: 173990595 --- Commit113be5746authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: A few profiler improvements 1. Track the full allocation history of each tensor, visualized in timeline. 2. Better ProfileContext for tracing step selection. 3. Small bug fix. PiperOrigin-RevId: 173988293 --- Commit6d1263cdfauthored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA] Remove dead opcode kIndex. PiperOrigin-RevId: 173987428 --- Commita4b5356e4authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Reduce boilerplate code in HLO visitors. Only pass the HloInstruction into visitor methods. This makes changing instructions and visitors easier. PiperOrigin-RevId: 173983398 --- Commitd9cee35b6authored by LevineHuang<levinehuang@163.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Typo fix in file 'fully_connected_feed.py' (#14033) * Typo fix in file 'fully_connected_feed.py' * Minor edits to coding style --- Commitbb7ed1c88authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: K-FAC: Multi-tower ConvNet example. PiperOrigin-RevId: 173982527 --- Commit2ba529856authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Initial add of docs for Tensorflow on Mobile. PiperOrigin-RevId: 173980290 --- Commit187453d61authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Change momentum optimizer to allow callable learning_rate and momentum parameters. This can be useful for implementing learninge rate decay. PiperOrigin-RevId: 173975321 --- Commit542b323e5authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Register quint16/qint16 for GatherOp. PiperOrigin-RevId: 173974904 --- Commit309e34061authored by Allen Lavoie<allenl@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Avoid uncollectable cycles with a separate deleter object for resources. PiperOrigin-RevId: 173972515 --- Commit73fdaf0b5authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Summary-writing support for Evaluators. PiperOrigin-RevId: 173971621 --- Commit72be26dc8authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [tf.data] Iterator Save and Restore for Dataset.from_tensors(..), Dataset.from_tensor_slices(..) and dataset.concatenate(..). PiperOrigin-RevId: 173971324 --- Commit09f62ab38authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Speeding up the case for sparse float columns that have only 1 value. PiperOrigin-RevId: 173971121 --- Commitc315cf1eeauthored by Shanqing Cai<cais@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Internal-only changes PiperOrigin-RevId: 173968246 --- Commit293ba20beauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Make learning_rate_decay.piecewise_constant work in Eager mode. PiperOrigin-RevId: 173967531 --- Commit0e6abfcdaauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: K-FAC: Example for multi-tower support for MNIST MLP. PiperOrigin-RevId: 173967370 --- Commitb46c196e9authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: * Add graph rewrite rule that removes repeated application of scalar unary ops that are involutions (their own inverse). * Update rewrite rule for Transpose to also handle ConjugateTranspose. PiperOrigin-RevId: 173967184 --- Commitff5c276adauthored by Stephan Hoyer<shoyer@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Longer README for tf.contrib.labeled_tensor PiperOrigin-RevId: 173966577 --- Commit558f146e1authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 173966068 --- Commitf9a673cb7authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: In the overloaded HloVerifier::CheckShape, include the failing instruction in the error message. PiperOrigin-RevId: 173965368 --- Commit302ab0ff7authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update ops-related pbtxt files. PiperOrigin-RevId: 173965174 --- Commit89120eb68authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: scatter_update for resource variables PiperOrigin-RevId: 173963715 --- Commit8f7903b4cauthored by Justine Tunney<jart@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Introduce SQLite SummaryWriterInterface This change allows tensors to be written from the graph, as they flow, directly to the database. Many of the important details haven't been implemented yet. This has been done with the new summary interface that's going to be used with eager. PiperOrigin-RevId: 173961448 --- Commit9aaa49a4eauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Avoid using variables as booleans (similarly to tensors). PiperOrigin-RevId: 173956625 --- Commita60cd87c4authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: No need for unique variable names in eager. PiperOrigin-RevId: 173954805 --- Commitf17f389d8authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add a workaround in the Grappler arithmetic optimizer for the "Add" op not being marked commutative. This will allow Grappler to dedup nodes Add(x,y) and Add(y,x). PiperOrigin-RevId: 173950586 --- Commite40eb810aauthored by Shanqing Cai<cais@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: TFE: Add errors for classic tf.summary.* ops and FileWriter PiperOrigin-RevId: 173949980 --- Commit25620825bauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Dataset: Adds eager warnings to make_initializable_iterator and make_one_shot_iterator. PiperOrigin-RevId: 173949737 --- Commit1d6dae88eauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add check to tf.device when called with a function in eager mode. PiperOrigin-RevId: 173947845 --- Commit3639aa7ffauthored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Always run iterator deleter in eager mode for safety. PiperOrigin-RevId: 173947019 --- Commitefcbf6e34authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Supported in this CL: * Attaching sharding descriptors to HLO ops * Partitioning the HLO graph into per-device computations based on those sharding descriptors. * All operator support for device placement and ops replicated on all devices. * Elementwise op support for tiled shardings. * 2D Convolution support for tiled shardings (no stride or dilation support). PiperOrigin-RevId: 173946036 --- Commit682a6ed64authored by Jon Shlens<shlens@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update the documentation for sample_distorted_bounding_box PiperOrigin-RevId: 173943029 --- Commit4f6e6ea4cauthored by Sanjoy Das<sanjoy@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix typo in comment; NFC PiperOrigin-RevId: 173942305 --- Commit07584221fauthored by Anna R<annarev@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Set visibility to HIDDEN for hidden Python ops in ApiDef. PiperOrigin-RevId: 173942001 --- Commit35cc8bb0aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: K-FAC: Multiple minibatches support for LayerCollection.register_conv2d() PiperOrigin-RevId: 173941279 --- Commit32f3c3a43authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 173933228 --- Commit8cc7b47a4authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update ops-related pbtxt files. PiperOrigin-RevId: 173932574 --- Commitb9337de5bauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: K-FAC: Multi-tower support for ConvKFCBasicFB PiperOrigin-RevId: 173932013 --- Commit1b6b7e208authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add registration for op AddV2, which is identical to Add, except that it does does not implement string concatenation. This allows us to mark AddV2 is_commutative and is_aggregate, which will allow optimizers more freedom. PiperOrigin-RevId: 173931848 --- Commit629e6d0c1authored by Joshua V. Dillon<jvdillon@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Bugfix: Make `tf.contrib.distributions.Independent` tests not flaky. PiperOrigin-RevId: 173921378 --- Commit4b63f47d9authored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA:CPU] Don't crash if someone tries to do dot(X, X) or dot(X, X^T). PiperOrigin-RevId: 173919310 --- Commit89582677cauthored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: EagerVariableStore, for compatibility with functional layers. PiperOrigin-RevId: 173915730 --- Commitcef680b53authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Enable shape inference on functions in grappler. PiperOrigin-RevId: 173914941 --- Commite8ac0b48fauthored by Akshay Agrawal<akshayka@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Report a nicer error message when differentiating a function that returns None in eager PiperOrigin-RevId: 173914883 --- Commit85f8d9240authored by Eugene Brevdo<ebrevdo@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [tensorflow training input] If SparseTensors are used in batch* ops, ensure restoration. This forces the ST restore op to be called if any tensors are accessed at the output of the batch, thus fixing a memory leak. Solution suggested by Derek Murray. Fixes #13999. PiperOrigin-RevId: 173904309 --- Commit7fd261602authored by Skye Wanderman-Milne<skyewm@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add TF_GraphVersions() to C API and use in Graph.graph_def_versions() PiperOrigin-RevId: 173902666 --- Commit4723f8f6eauthored by RJ Ryan<rjryan@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Support SymbolicGradient for functions with non-trainable arguments. The non-trainable arguments end up with None as their incoming out_grad, which is not a valid input to SymbolicGradient (inputs have to be convertible to Tensor, and None isn't). PiperOrigin-RevId: 173901727 --- Commit494672475authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Added "NOTE: You may only install TensorFlow on 64-bit machines" to all the TensorFlow Install guides. PiperOrigin-RevId: 173899394 --- Commitb73743e3aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Remove accidental disablation of (already manual) tests. PiperOrigin-RevId: 173898910 --- Commitce0238198authored by Skye Wanderman-Milne<skyewm@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add ability to fetch return nodes and unused input mappings from C API GraphDef import This change introduces yet another ImportGraphDef function to the C API (TF_GraphImportGraphDefWithResults), but this one has extensible return values so we shouldn't have to add more in the future. This change also modifies the ImportGraphDef C interface to manage all string data for the user. PiperOrigin-RevId: 173894710 --- Commitef4490f63authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: BUILD cleanup in contrib/... PiperOrigin-RevId: 173889798 --- Commit2e54fd6deauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds eager execution compatibility note in Readers, Queues, and QueueRunner. Raises a RuntimeError in base classes for QueueBase, ReaderBase, and QueueRunner. PiperOrigin-RevId: 173888425 --- Commit32ab30cb0authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fixes typo in compatibility. PiperOrigin-RevId: 173887031 --- Commit325c8e5efauthored by Justine Tunney<jart@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Improve C++ SQLite veneer - Use shared_ptr for Sqlite - Don't need unique_ptr on SqliteStatement - Don't need db namespace - Include SQL in error statuses PiperOrigin-RevId: 173802267 --- Commit0eba15fe6authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds eager compatability message for PartitionedVariable. PiperOrigin-RevId: 173772851 --- Commite7645b629authored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA] DOT dumper: Handle fusion nodes nested inside other nodes (e.g. map). PiperOrigin-RevId: 173752314 --- Commit8ec7540e0authored by Shanqing Cai<cais@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: TFE: Fix pip test for tf.contrib.summary Fixes test failure in tensorflow/contrib/summary:summary_ops_test, e.g., http://ci.tensorflow.org/job/tensorflow-cl-cpu-python3-pip/10933/console PiperOrigin-RevId: 173749502 --- Commitc16797ec3authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds eager execution compatibility note in Estimators. Raises a RuntimeError in Estimator base class. PiperOrigin-RevId: 173744765 --- Commite8a62a30bauthored by ???<dev@goodow.com> Committed by GitHub<noreply@github.com>: Fix minor typo --- Commit36696ad58authored by ???<dev@goodow.com> Committed by Larry Tin<dev@goodow.com>: tf.zeros doesn't accept a tensor argument ValueError: Shape must be rank 1 but is rank 0 for 'zeros_2' (op: 'Fill') with input shapes: [], []. --- Commit9f4b12bb5authored by Justin Lebar<jlebar@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA] DOT dumper: Print constant shape when we elide the constant's value. For example, instead of "operand 1 = %constant.42", we now print "operand 1 = %constant.42 (f32[100])". PiperOrigin-RevId: 173741373 --- Commit45c5118f0authored by Mark Heffernan<meheff@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: When creating an HloModule from an HloProto construct the HloModuleConfig with a correct ProgramShape which matches the shapes of the entry computation. Previously the module config had a bogus or default constructed ProgramShape. PiperOrigin-RevId: 173741104 --- Commit09a89ae57authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add `tf.contrib.distributions.bijectors.Reshape`. PiperOrigin-RevId: 173740491 --- Commit729db035eauthored by Mark Daoust<markdaoust@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Allow compatibility notes in class, property and module doc-strings PiperOrigin-RevId: 173739674 --- Commitca56fa49aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 173739110 --- Commit48df7c972authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update ops-related pbtxt files. PiperOrigin-RevId: 173738765 --- Commitfb2c84cb2authored by Jeremy Lau<lauj@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Internal change PiperOrigin-RevId: 173738655 --- Commit245a5c171authored by Akshay Agrawal<akshayka@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Make functional_ops compatible with eager exeuction by ignoring caching devices when in eager mode PiperOrigin-RevId: 173737949 --- Commitd1c59bd37authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add tf.quantize op, which is the same as tf.quantize_v2. PiperOrigin-RevId: 173735986 --- Commit3ff9c8d2aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix typos in Linear Model Tutorial samples 1. test_file_name is undefined (should be test_file.name) 2. train_file_name is undefined (should be train_file.name) PiperOrigin-RevId: 173733442 --- Commitabbab2430authored by Michael Case<mikecase@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add bazel mirror links for newly added workspace dependencies. PiperOrigin-RevId: 173732606 --- Commit46a577febauthored by Derek Murray<mrry@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [CMake] Generate audio_ops wrappers in the CMake build. Fixes #14004. PiperOrigin-RevId: 173732397 --- Commit7cb7f88c5authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add count metric, a helper function that computes the total number or total weight of examples. PiperOrigin-RevId: 173731046 --- Commite1d7615ebauthored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix issue with gradients of functions which return multiple values. PiperOrigin-RevId: 173730922 --- Commit80374a7b4authored by Joshua V. Dillon<jvdillon@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Breaking change: Rename `tf.contrib.distributions.Independent` parameter from `reduce_batch_ndims` to `reinterpreted_batch_ndims`. Also change default; `reinterpreted_batch_ndims` default has semantics of `tf.layers.flatten`, i.e., all batch dimensions except the first (batch axis 0) are interpretted as being part of the event. PiperOrigin-RevId: 173729585 --- Commit5426a3c93authored by Allen Lavoie<allenl@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add tfe.get_optimizer_variables for fetching a list of variables which an optimizer has created. Useful for saving them if executing eagerly. PiperOrigin-RevId: 173726859 --- Commit02f55400fauthored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: custom_gradient functions should be able to return their inputs PiperOrigin-RevId: 173723462 --- Commit78bac7290authored by Shanqing Cai<cais@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: TFE: Add compatbility doc string to add_to_collection() and friends PiperOrigin-RevId: 173716912 --- Commit9bf00c371authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Shorter import for tfe. PiperOrigin-RevId: 173716375 --- Commit0bc432a44authored by Shanqing Cai<cais@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: TFE: Add compatibility errors and doc strings to queues, input pipelines and Supervisor PiperOrigin-RevId: 173712330 --- Commite9af1af4fauthored by Amit Patankar<amitpatankar@google.com> Committed by Amit Patankar<amitpatankar@google.com>: Fixing the sources docs in master. --- Commitb31b08bb0authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds randomized tests for newly introduced complex and related ops. PiperOrigin-RevId: 173709206 --- Commit466b9ecf8authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Report total number of bytes to be transferred when the curl request makes no progress. PiperOrigin-RevId: 173707608 --- Commit7c4e98eb4authored by Igor Ganichev<iga@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add Tensor._rank() getter It appears to speed up SPINN model by about 1%, which is not much, but this method is very simple and easier to use than len(tensor._shape_tuple()) PiperOrigin-RevId: 173703259 --- Commitd7cffe9c0authored by Allen Lavoie<allenl@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Adds save and restore methods to tfe.Network Save just saves the variables to a checkpoint. Restore either restores immediately or defers the restoration to variable creation time with a custom getter. PiperOrigin-RevId: 173703075 --- Commit9158f974aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Use tf.app.run in gcs_smoke, so that the flags are explicitly parsed, instead of parsed when first accessed. PiperOrigin-RevId: 173702828 --- Commit3d39b32b9authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Fix a tfprof bug. Throws an error when the flops cannot be calculated. PiperOrigin-RevId: 173702740 --- Commit73155f56aauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Small code cleanup. Re-alphabetized. PiperOrigin-RevId: 173702336 --- Commit32bcf46f1authored by Mustafa Ispir<ispir@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: internal PiperOrigin-RevId: 173697389 --- Commit97484a4d9authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Update ops-related pbtxt files. PiperOrigin-RevId: 173690751 --- Commit873ef2ca3authored by Oleg Zabluda<ozabluda@gmail.com> Committed by GitHub<noreply@github.com>: Fix documentation error in tf.size() - output type --- Commit16538dab7authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Saves summaries in the mnist example. PiperOrigin-RevId: 173690505 --- Commit6b05b36cdauthored by Jiri Simsa<jsimsa@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Generalizing sloppy_interleave, making sloppiness an option. PiperOrigin-RevId: 173687797 --- Commit7775a6604authored by Michael Case<mikecase@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Internal Change PiperOrigin-RevId: 173685895 --- Commit5120e75cfauthored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Move `@compatibility(eager)` from class docstring to __init__ docstring Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit7d7b2ec58authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Also fixes `@end_compatiblity` -> `@end_compatibility` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit96dc501cdauthored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Fix incorrect annotation tag in tf.Variable In tf.Variable the annotation tag of `@compatiblity` should be `@compatibility` --- Commitc22973867authored by Mark Daoust<markdaoust@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Delete bad links (md links not supported in html blocks). PiperOrigin-RevId: 173680417 --- Commit4198e27beauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [XLA:CPU] [XLA:GPU] Adds compiler support for C64 primitive type, including relevant elementwise unary and binary op lowering for CPU and GPU. We use a named LLVM struct "complex64", laid out the same as std::complex<float>. This named struct is accessed via the llvm::Module, which required changes to accessors of PrimitiveTypeToIrType & friends. Ops that require atan2 (in particular, angle and log) are only supported on GPU at this point. LLVM lacks a CPU intrinsic for atan or atan2, whereas libdevice provides this for GPU. PiperOrigin-RevId: 173676849 --- Commit4ae245a7dauthored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: n/a (internal change only) PiperOrigin-RevId: 173674697 --- Commit0ccf5cf60authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Limit the amount of logspam a use of GraphKeys.VARIABLES causes. Multiple copies of this warning next to each other often make logs unreadable. PiperOrigin-RevId: 173672701 --- Commita7b872527authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Fix an ouput typo in `ci_sanity.sh` In the last PR #13924 (clang sanity check) the output message should be changed: `due to the absence of Python code changes` -> `due to the absence of .h or .cc code changes` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit58d2c5f50authored by Yong Tang<yong.tang.github@outlook.com> Committed by Shanqing Cai<cais@google.com>: Add `SANITY_STEPS_DESC` for do_clang_format_check (#14030) * Add `SANITY_STEPS_DESC` for do_clang_format_check This fix is a follow up to PR #13924 to add the corresponding description in `SANITY_STEPS_DESC`. See comment #13924#discussion_r147314599 for details. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update description for Clang Format Check Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit62a9ab28cauthored by ???<dev@goodow.com> Committed by GitHub<noreply@github.com>: fix broken link --- Commitc6292a3f9authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Sanitize decode_csv_op.cc with `clang-format -i` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit285ea3910authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Add test cases for `double` support of `tf.decode_csv` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit73aaed655authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Update docs for `double` support on `tf.decode_csv` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit3595d1613authored by Yong Tang<yong.tang.github@outlook.com> Committed by Yong Tang<yong.tang.github@outlook.com>: Add `double` support for `tf.decode_csv` In the current tensorflow `tf.decode_csv` accepts `float`, `int32`, `int64`, `string` but not `double`. It seems adding `double` support makes sense as `StringToNumber` already support `double` type. This fix adds `double` support for `tf.decode_csv` Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit37d483fdaauthored by Sergii Khomenko<sergii.khomenko@stylight.com> Committed by Sergii Khomenko<sergii.khomenko@stylight.com>: Fix a typo --- Commit9c8a520b0authored by Justine Tunney<jart@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add WriteEvent method to SummaryWriterInterface Another change will follow that adds an op for this method. It will be useful for loading event logs into other types of summary writer implementations, like a database. This change might also make the new summary file writer go faster, due to less memory copying. PiperOrigin-RevId: 173640116 --- Commita49455812authored by Eugene Brevdo<ebrevdo@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: BEGIN_PUBLIC Automated g4 rollback of changelist 172654120 PiperOrigin-RevId: 174388998
25 KiB
Writing TensorFlow Documentation
We welcome contributions to the TensorFlow documentation from the community. This document explains how you can contribute to that documentation. In particular, this document explains the following:
- Where the documentation is located.
- How to make conformant edits.
- How to build and test your documentation changes before you submit them.
You can view TensorFlow documentation on https://www.tensorflow.org, and you
can view and edit the raw files on
GitHub.
We're publishing our docs on GitHub so everybody can contribute. Whatever gets
checked in to tensorflow/docs_src will be published soon after on
https://www.tensorflow.org.
Republishing TensorFlow documentation in different forms is absolutely allowed, but we are unlikely to accept other documentation formats (or the tooling to generate them) into our repository. If you do choose to republish our documentation in another form, please be sure to include:
- The version of the API this represents (for example, r1.0, master, etc.)
- The commit or version from which the documentation was generated
- Where to get the latest documentation (that is, https://www.tensorflow.org)
- The Apache 2.0 license.
A note on versions
tensorflow.org, at root, shows documentation for the latest stable binary. This
is the documentation you should be reading if you are using pip to install
TensorFlow.
However, most developers will contribute documentation into the master GitHub branch, which is published, occasionally, at tensorflow.org/versions/master.
If you want documentation changes to appear at root, you will need to also contribute that change to the current stable binary branch (and/or cherrypick).
Reference vs. non-reference documentation
The following reference documentation is automatically generated from comments in the code:
- C++ API reference docs
- Java API reference docs
- Python API reference docs
To modify the reference documentation, you edit the appropriate code comments.
Non-reference documentation (for example, the TensorFlow installation guides) is
authored by humans. This documentation is located in the
tensorflow/docs_src
directory. Each subdirectory of docs_src contains a set of related TensorFlow
documentation. For example, the TensorFlow installation guides are all in the
docs_src/install directory.
The C++ documentation is generated from XML files generated via doxygen; however, those tools are not available in open source at this time.
Markdown
Editable TensorFlow documentation is written in Markdown. With a few exceptions, TensorFlow uses the standard Markdown rules.
This section explains the primary differences between standard Markdown rules and the Markdown rules that editable TensorFlow documentation uses.
Math in Markdown
You may use MathJax within TensorFlow when editing Markdown files, but note the following:
- MathJax renders properly on tensorflow.org
- MathJax does not render properly on github.
When writing MathJax, you can use $$ and \\( and \\) to
surround your math. $$ guards will cause line breaks, so
within text, use \\( \\) instead.
Links in Markdown
Links fall into a few categories:
- Links to a different part of the same file
- Links to a URL outside of tensorflow.org
- Links from a Markdown file (or code comments) to another file within tensorflow.org
For the first two link categories, you may use standard Markdown links, but put the link entirely on one line, rather than splitting it across lines. For example:
[text](link) # Good link[text]\n(link) # Bad link[text](\nlink) # Bad link
For the final link category (links to another file within tensorflow.org), please use a special link parameterization mechanism. This mechanism enables authors to move and reorganize files without breaking links.
The parameterization scheme is as follows. Use:
-
@{tf.symbol}to make a link to the reference page for a Python symbol. Note that class members don't get their own page, but the syntax still works, since@{tf.MyClass.method}links to the proper part of the tf.MyClass page. -
@{tensorflow::symbol}to make a link to the reference page for a C++ symbol. -
@{$doc_page}to make a link to another (not an API reference) doc page. To link to-
red/green/blue/index.mduse@{$blue}or@{$green/blue}, -
foo/bar/baz.mduse@{$baz}or@{$bar/baz}.
The shorter one is preferred, so we can move pages around without breaking these references. The main exception is that the Python API guides should probably be referred to using
@{$python/}to avoid ambiguity. -
-
@{$doc_page#anchor-tag$link-text}to link to an anchor in that doc and use different link text (by default, the link text is the title of the target page).To override the link text only, omit the
#anchor-tag.
To link to source code, use a link starting with:
https://www.tensorflow.org/code/, followed by
the file name starting at the github root. For instance, a link to the file you
are currently reading should be written as
https://www.tensorflow.org/code/tensorflow/docs_src/community/documentation.md.
This URL naming scheme ensures that tensorflow.org can forward the link to the branch of the code corresponding to the version of the documentation you're viewing. Do not include url parameters in the source code URL.
Generating docs and previewing links
Before building the documentation, you must first set up your environment by doing the following:
-
If pip isn't installed on your machine, install it now by issuing the following command:
$ sudo easy_install pip -
Use pip to install codegen, mock, and pandas by issuing the following command (Note: If you are using a virtualenv to manage your dependencies, you may not want to use sudo for these installations):
$ sudo pip install codegen mock pandas -
If bazel is not installed on your machine, install it now. If you are on Linux, install bazel by issuing the following command:
$ sudo apt-get install bazel # LinuxIf you are on Mac OS, find bazel installation instructions on this page.
-
Change directory to the top-level
tensorflowdirectory of the TensorFlow source code. -
Run the
configurescript and answer its prompts appropriately for your system.$ ./configure
Then, change to the tensorflow directory which contains docs_src (cd tensorflow). Run the following command to compile TensorFlow and generate the
documentation in the /tmp/tfdocs dir:
bazel run tools/docs:generate -- \
--src_dir="$(pwd)/docs_src/" \
--output_dir=/tmp/tfdocs/
Note: You must set src_dir and output_dir to absolute file paths.
Generating Python API documentation
Ops, classes, and utility functions are defined in Python modules, such as
image_ops.py. Python modules contain a module docstring. For example:
"""Image processing and decoding ops."""
The documentation generator places this module docstring at the beginning of the Markdown file generated for the module, in this case, tf.image.
It used to be a requirement to list every member of a module inside the module
file at the beginning, putting a @@ before each member. The @@member_name
syntax is deprecated and no longer generates any docs. But depending on how a
module is sealed it may still be necessary to mark the
elements of the module’s contents as public. The called-out op, function, or
class does not have to be defined in the same file. The next few sections of
this document discuss sealing and how to add elements to the public
documentation.
The new documentation system automatically documents public symbols, except for the following:
- Private symbols whose names start with an underscore.
- Symbols originally defined in
objector protobuf’sMessage. - Some class members, such as
__base__,__class__, which are dynamically created but generally have no useful documentation.
Only top level modules (currently just tf and tfdbg) need to be manually
added to the generate script.
Sealing modules
Because the doc generator walks all visible symbols, and descends into anything it finds, it will document any accidentally exposed symbols. If a module only exposes symbols that are meant to be part of the public API, we call it sealed. Because of Python’s loose import and visibility conventions, naively written Python code will inadvertently expose a lot of modules which are implementation details. Improperly sealed modules may expose other unsealed modules, which will typically lead the doc generator to fail. This failure is the intended behavior. It ensures that our API is well defined, and allows us to change implementation details (including which modules are imported where) without fear of accidentally breaking users.
If a module is accidentally imported, it typically breaks the doc generator
(generate_test). This is a clear sign you need to seal your modules. However,
even if the doc generator succeeds, unwanted symbols may show up in the
docs. Check the generated docs to make sure that all symbols that are documented
are expected. If there are symbols that shouldn’t be there, you have the
following options for dealing with them:
- Private symbols and imports
- The
remove_undocumentedfilter - A traversal blacklist.
We'll discuss these options in detail below.
Private symbols and imports
The easiest way to conform to the API sealing expectations is to make non-public
symbols private (by prepending an underscore _). The doc generator respects
private symbols. This also applies to modules. If the only problem is that there
is a small number of imported modules that show up in the docs (or break the
generator), you can simply rename them on import, e.g.: import sys as _sys.
Because Python considers all files to be modules, this applies to files as well. If you have a directory containing the following two files/modules:
module/__init__.py
module/private_impl.py
Then, after module is imported, it will be possible to access
module.private_impl. Renaming private_impl.py to _private_impl.py solves
the problem. If renaming modules is awkward, read on.
Use the remove_undocumented filter
Another way to seal a module is to split your implementation from the API. To do
so, consider using remove_undocumented, which takes a list of allowed symbols,
and deletes everything else from the module. For example, the following snippet
demonstrates how to put remove_undocumented in the __init__.py file for a
module:
init.py:
# Use * imports only if __all__ defined in some_file
from tensorflow.some_module.some_file import *
# Otherwise import symbols directly
from tensorflow.some_module.some_other_file import some_symbol
from tensorflow.python.util.all_util import remove_undocumented
_allowed_symbols = [‘some_symbol’, ‘some_other_symbol’]
remove_undocumented(__name__, allowed_exception_list=_allowed_symbols)
The @@member_name syntax is deprecated, but it still exists in some places in
the documentation as an indicator to remove_undocumented that those symbols
are public. All @@s will eventually be removed. If you see them, however,
please do not randomly delete them as they are still in use by some of our
systems.
Traversal blacklist
If all else fails, you may add entries to the traversal blacklist in
generate_lib.py. Almost all entries in this list are an abuse of its
purpose; avoid adding to it if you can!
The traversal blacklist maps qualified module names (without the leading tf.)
to local names that are not to be descended into. For instance, the following
entry will exclude some_module from traversal.
{ ...
‘contrib.my_module’: [‘some_module’]
...
}
That means that the doc generator will show that some_module exists, but it
will not enumerate its content.
This blacklist was originally intended to make sure that system modules (mock, flags, ...) included for platform abstraction can be documented without documenting their interior. Its use beyond this purpose is a shortcut that may be acceptable for contrib, but not for core tensorflow.
Op documentation style guide
Long, descriptive module-level documentation for modules should go in the API
Guides in docs_src/api_guides/python.
For classes and ops, ideally, you should provide the following information, in order of presentation:
- A short sentence that describes what the op does.
- A short description of what happens when you pass arguments to the op.
- An example showing how the op works (pseudocode is best).
- Requirements, caveats, important notes (if there are any).
- Descriptions of inputs, outputs, and Attrs or other parameters of the op constructor.
Each of these is described in more detail below.
Write your text in Markdown format. A basic syntax reference is here. You are allowed to use MathJax notation for equations (see above for restrictions).
Writing about code
Put backticks around these things when they're used in text:
- Argument names (for example,
input,x,tensor) - Returned tensor names (for example,
output,idx,out) - Data types (for example,
int32,float,uint8) - Other op names referenced in text (for example,
list_diff(),shuffle()) - Class names (for example,
Tensorwhen you actually mean aTensorobject; don't capitalize or use backticks if you're just explaining what an op does to a tensor, or a graph, or an operation in general) - File names (for example,
image_ops.py, or/path-to-your-data/xml/example-name) - Math expressions or conditions (for example,
-1-input.dims() <= dim <= input.dims())
Put three backticks around sample code and pseudocode examples. And use ==>
instead of a single equal sign when you want to show what an op returns. For
example:
```
# 'input' is a tensor of shape [2, 3, 5]
(tf.expand_dims(input, 0)) ==> [1, 2, 3, 5]
```
If you're providing a Python code sample, add the python style label to ensure proper syntax highlighting:
```python
# some Python code
```
Two notes about backticks for code samples in Markdown:
- You can use backticks for pretty printing languages other than Python, if necessary. A full list of languages is available here.
- Markdown also allows you to indent four spaces to specify a code sample. However, do NOT indent four spaces and use backticks simultaneously. Use one or the other.
Tensor dimensions
When you're talking about a tensor in general, don't capitalize the word tensor.
When you're talking about the specific object that's provided to an op as an
argument or returned by an op, then you should capitalize the word Tensor and
add backticks around it because you're talking about a Tensor object.
Don't use the word Tensors to describe multiple Tensor objects unless you
really are talking about a Tensors object. Better to say "a list of Tensor
objects."
Use the term "dimension" to refer to the size of a tensor. If you need to be specific about the size, use these conventions:
- Refer to a scalar as a "0-D tensor"
- Refer to a vector as a "1-D tensor"
- Refer to a matrix as a "2-D tensor"
- Refer to tensors with 3 or more dimensions as 3-D tensors or n-D tensors. Use the word "rank" only if it makes sense, but try to use "dimension" instead. Never use the word "order" to describe the size of a tensor.
Use the word "shape" to detail the dimensions of a tensor, and show the shape in square brackets with backticks. For example:
If `input` is a 3-D tensor with shape `[3, 4, 3]`, this operation
returns a 3-D tensor with shape `[6, 8, 6]`.
Ops defined in C++
All Ops defined in C++ (and accessible from other languages) must be documented
with a REGISTER_OP declaration. The docstring in the C++ file is processed to
automatically add some information for the input types, output types, and Attr
types and default values.
For example:
```c++
REGISTER_OP("PngDecode")
.Input("contents: string")
.Attr("channels: int = 0")
.Output("image: uint8")
.Doc(R"doc(
Decodes the contents of a PNG file into a uint8 tensor.
contents: PNG file contents.
channels: Number of color channels, or 0 to autodetect based on the input.
Must be 0 for autodetect, 1 for grayscale, 3 for RGB, or 4 for RGBA.
If the input has a different number of channels, it will be transformed
accordingly.
image:= A 3-D uint8 tensor of shape `[height, width, channels]`.
If `channels` is 0, the last dimension is determined
from the png contents.
)doc");
```
Results in this piece of Markdown:
### tf.image.png_decode(contents, channels=None, name=None) {#png_decode}
Decodes the contents of a PNG file into a uint8 tensor.
#### Args:
* <b>contents</b>: A string Tensor. PNG file contents.
* <b>channels</b>: An optional int. Defaults to 0.
Number of color channels, or 0 to autodetect based on the input.
Must be 0 for autodetect, 1 for grayscale, 3 for RGB, or 4 for RGBA. If the
input has a different number of channels, it will be transformed accordingly.
* <b>name</b>: A name for the operation (optional).
#### Returns:
A 3-D uint8 tensor of shape `[height, width, channels]`. If `channels` is
0, the last dimension is determined from the png contents.
Much of the argument description is added automatically. In particular, the doc
generator automatically adds the name and type of all inputs, attrs, and
outputs. In the above example, <b>contents</b>: A string Tensor. was added
automatically. You should write your additional text to flow naturally after
that description.
For inputs and output, you can prefix your additional text with an equal sign to
prevent the automatically added name and type. In the above example, the
description for the output named image starts with = to prevent the addition
of A uint8 Tensor. before our text A 3-D uint8 Tensor.... You cannot prevent
the addition of the name, type, and default value of attrs this way, so write
your text carefully.
Ops defined in Python
If your op is defined in a python/ops/*.py file, then you need to provide text
for all of the arguments and output (returned) tensors. The doc generator does
not auto-generate any text for ops that are defined in Python, so what you write
is what you get.
You should conform to the usual Python docstring conventions, except that you should use Markdown in the docstring.
Here's a simple example:
def foo(x, y, name="bar"):
"""Computes foo.
Given two 1-D tensors `x` and `y`, this operation computes the foo.
Example:
x is [1, 1]
y is [2, 2]
tf.foo(x, y) ==> [3, 3]
Args:
x: A `Tensor` of type `int32`.
y: A `Tensor` of type `int32`.
name: A name for the operation (optional).
Returns:
A `Tensor` of type `int32` that is the foo of `x` and `y`.
Raises:
ValueError: If `x` or `y` are not of type `int32`.
"""
Description of the docstring sections
This section details each of the elements in docstrings.
Short sentence describing what the op does
Examples:
Concatenates tensors.
Flips an image horizontally from left to right.
Computes the Levenshtein distance between two sequences.
Saves a list of tensors to a file.
Extracts a slice from a tensor.
Short description of what happens when you pass arguments to the op
Examples:
Given a tensor input of numerical type, this operation returns a tensor of
the same type and size with values reversed along dimension `seq_dim`. A
vector `seq_lengths` determines which elements are reversed for each index
within dimension 0 (usually the batch dimension).
This operation returns a tensor of type `dtype` and dimensions `shape`, with
all elements set to zero.
Example demonstrating the op
Good code samples are short and easy to understand, typically containing a brief snippet of code to clarify what the example is demonstrating. When an op manipulates the shape of a Tensor it is often useful to include an example of the before and after, as well.
The squeeze() op has a nice pseudocode example:
# 't' is a tensor of shape [1, 2, 1, 3, 1, 1]
shape(squeeze(t)) ==> [2, 3]
The tile() op provides a good example in descriptive text:
For example, tiling `[a, b, c, d]` by `[2]` produces `[a b c d a b c d]`.
It is often helpful to show code samples in Python. Never put them in the C++ Ops file, and avoid putting them in the Python Ops doc. We recommend, if possible, putting code samples in the API guides. Otherwise, add them to the module or class docstring where the Ops constructors are called out.
Here's an example from the module docstring in api_guides/python/math_ops.md:
## Segmentation
TensorFlow provides several operations that you can use to perform common
math computations on tensor segments.
...
In particular, a segmentation of a matrix tensor is a mapping of rows to
segments.
For example:
```python
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
tf.segment_sum(c, tf.constant([0, 0, 1]))
==> [[0 0 0 0]
[5 6 7 8]]
```
Requirements, caveats, important notes
Examples:
This operation requires that: `-1-input.dims() <= dim <= input.dims()`
Note: This tensor will produce an error if evaluated. Its value must
be fed using the `feed_dict` optional argument to `Session.run()`,
`Tensor.eval()`, or `Operation.run()`.
Descriptions of arguments and output (returned) tensors.
Keep the descriptions brief and to the point. You should not have to explain how the operation works in the argument sections.
Mention if the Op has strong constraints on the dimensions of the input or
output tensors. Remember that for C++ Ops, the type of the tensor is
automatically added as either as "A ..type.. Tensor" or "A Tensor with type in
{...list of types...}". In such cases, if the Op has a constraint on the
dimensions either add text such as "Must be 4-D" or start the description with
= (to prevent the tensor type to be added) and write something like "A 4-D
float tensor".
For example, here are two ways to document an image argument of a C++ op (note the "=" sign):
image: Must be 4-D. The image to resize.
image:= A 4-D `float` tensor. The image to resize.
In the documentation, these will be rendered to markdown as
image: A `float` Tensor. Must be 4-D. The image to resize.
image: A 4-D `float` Tensor. The image to resize.
Optional arguments descriptions ("attrs")
The doc generator always describes the type for each attr and their default value, if any. You cannot override that with an equal sign because the description is very different in the C++ and Python generated docs.
Phrase any additional attr description so that it flows well after the type and default value. The type and defaults are displayed first, and additional descriptions follow afterwards. Therefore, complete sentences are best.
Here's an example from image_ops.cc:
REGISTER_OP("DecodePng")
.Input("contents: string")
.Attr("channels: int = 0")
.Attr("dtype: {uint8, uint16} = DT_UINT8")
.Output("image: dtype")
.SetShapeFn(DecodeImageShapeFn)
.Doc(R"doc(
Decode a PNG-encoded image to a uint8 or uint16 tensor.
The attr `channels` indicates the desired number of color channels for the
decoded image.
Accepted values are:
* 0: Use the number of channels in the PNG-encoded image.
* 1: output a grayscale image.
* 3: output an RGB image.
* 4: output an RGBA image.
If needed, the PNG-encoded image is transformed to match the requested
number of color channels.
contents: 0-D. The PNG-encoded image.
channels: Number of color channels for the decoded image.
image: 3-D with shape `[height, width, channels]`.
)doc");
This generates the following Args section in
api_docs/python/tf/image/decode_png.md:
#### Args:
* <b>`contents`</b>: A `Tensor` of type `string`. 0-D. The PNG-encoded
image.
* <b>`channels`</b>: An optional `int`. Defaults to `0`. Number of color
channels for the decoded image.
* <b>`dtype`</b>: An optional `tf.DType` from: `tf.uint8,
tf.uint16`. Defaults to `tf.uint 8`.
* <b>`name`</b>: A name for the operation (optional).