Yong Tang [Wed, 7 Feb 2018 06:53:33 +0000 (22:53 -0800)]
Fix incorrect links in CONTRIBUTING.md (#16814)
This fix fixes two incorrect links in CONTRIBUTING.md
about license examples. The reason for broken links
is because tensorboard is in another repo.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Amit Patankar [Tue, 6 Feb 2018 19:04:17 +0000 (11:04 -0800)]
Merge pull request #16785 from av8ramit/merge_branch
Merging the 1.6 branch back into master.
ted chang [Tue, 6 Feb 2018 18:44:48 +0000 (10:44 -0800)]
remove write_version=saver_pb2.SaverDef.V1 (#15966)
Amit Patankar [Tue, 6 Feb 2018 18:40:54 +0000 (10:40 -0800)]
Merge pull request #16789 from ManHyuk/fix_typo
Fix typo
Michael Case [Tue, 6 Feb 2018 18:28:19 +0000 (10:28 -0800)]
Merge pull request #16792 from case540/branch_184622482
Branch
184622482
Michael Case [Tue, 6 Feb 2018 07:09:28 +0000 (23:09 -0800)]
Merge commit for internal changes
A. Unique TensorFlower [Tue, 6 Feb 2018 02:45:13 +0000 (18:45 -0800)]
Export align_corners to TF Lite
PiperOrigin-RevId:
184622482
Benoit Steiner [Tue, 6 Feb 2018 02:22:37 +0000 (18:22 -0800)]
Added the ability to query the amount of RAM available
Also added the ability to query the CPU frequency on Windows.
PiperOrigin-RevId:
184620390
Joshua V. Dillon [Tue, 6 Feb 2018 01:55:26 +0000 (17:55 -0800)]
Cleanup markdown errors in `Bijector`.
PiperOrigin-RevId:
184616392
Justin Lebar [Tue, 6 Feb 2018 01:45:26 +0000 (17:45 -0800)]
[XLA] Add HloBindings::ToString().
PiperOrigin-RevId:
184615306
Igor Saprykin [Tue, 6 Feb 2018 01:24:31 +0000 (17:24 -0800)]
Correctly treat "devices=/gpu:0" argument of replicate_model_fn.
At the moment if "devices=/GPU:0" are specified by the user, then variables are going to be placed on the GPU. However, if "devices=/gpu:0" are given, then they are going to be placed on the CPU. Instead, the latter case should be equivalent to the former case.
PiperOrigin-RevId:
184612823
Mingsheng Hong [Tue, 6 Feb 2018 01:16:27 +0000 (17:16 -0800)]
Misc cleanups and tweaks:
1. Removed obsolete constructors in ProcessLunctionLibraryRuntime
2. Add const annotations to Tensor::PrintOneDim(), and removed unnecessary vector copy.
PiperOrigin-RevId:
184611531
Justin Lebar [Tue, 6 Feb 2018 01:11:39 +0000 (17:11 -0800)]
[XLA:GPU] Split IrEmitter{Unn,N}ested out of ir_emitter.h.
Also add a bunch of clarifying comments.
PiperOrigin-RevId:
184610674
ManHyuk [Tue, 6 Feb 2018 00:53:16 +0000 (09:53 +0900)]
Merge branch 'master' of https://github.com/tensorflow/tensorflow into fix_typo
ManHyuk [Tue, 6 Feb 2018 00:53:07 +0000 (09:53 +0900)]
fix typo
A. Unique TensorFlower [Tue, 6 Feb 2018 00:32:38 +0000 (16:32 -0800)]
Support negative axis in concatenation
PiperOrigin-RevId:
184605786
A. Unique TensorFlower [Tue, 6 Feb 2018 00:12:19 +0000 (16:12 -0800)]
Shard linear operator tests.
PiperOrigin-RevId:
184602704
ImSheridan [Tue, 6 Feb 2018 00:15:33 +0000 (08:15 +0800)]
Fix the mean the description of the output shape, which should be [batch_size, 1, max_time] (#16642)
Glenn Weidner [Tue, 6 Feb 2018 00:15:21 +0000 (16:15 -0800)]
Remove invalid exception in linear operator (#16678)
Amit Patankar [Tue, 6 Feb 2018 00:08:16 +0000 (16:08 -0800)]
Add filepaths to test_local support.
PiperOrigin-RevId:
184602010
Yifei Feng [Tue, 6 Feb 2018 00:04:06 +0000 (16:04 -0800)]
Remove makefile build dependency on all_opensource_files, as part of the effort to remove all_opensource_files #15758.
PiperOrigin-RevId:
184601439
Jonathan Hseu [Tue, 6 Feb 2018 00:05:25 +0000 (16:05 -0800)]
Bump the rtol in hmc_test (#16787)
Skye Wanderman-Milne [Mon, 5 Feb 2018 23:49:57 +0000 (15:49 -0800)]
"frame_name" attr must be altered when importing/exporting MetaGraphDefs.
The frame_name attr of Enter operations must be the name of the
associated WhileLoopContext, otherwise taking the gradient of the loop
will result in frame errors.
I'm not happy that the export logic is in meta_graph.py (all other
control flow de/serialization is in control_flow_ops.py). However, I
can't think of how else to do it, since only export_scoped_meta_graph
has access to the NodeDefs being exported.
PiperOrigin-RevId:
184599323
A. Unique TensorFlower [Mon, 5 Feb 2018 23:46:50 +0000 (15:46 -0800)]
[XLA] Sink layout sensitivity from CSE into HloInstruction::Identical, and make it the default.
PiperOrigin-RevId:
184598903
Suharsh Sivakumar [Mon, 5 Feb 2018 23:32:32 +0000 (15:32 -0800)]
Make fold batch norm code use OneofPattern and rearrange functions to (maybe) be more readable.
PiperOrigin-RevId:
184597111
Marshal Hayes [Mon, 5 Feb 2018 23:35:46 +0000 (17:35 -0600)]
Removing duplicate code block that raises exception (#16568)
For TensorFlow version 1.5.0-rc1, the code block below raises a `ValueError`. Simply remove the duplication (lines 274 - 277 are exactly the same) and the issue is resolved.
```
# Add returned summaries to writer in each step.
writer.add_summary(summary, step)
# Add metadata to visualize the graph for the last run.
if step == (num_steps - 1):
writer.add_run_metadata(run_metadata, 'step%d' % step)
```
A. Unique TensorFlower [Mon, 5 Feb 2018 23:30:54 +0000 (15:30 -0800)]
Assign total_loss in order not to crash if training loop exists early.
PiperOrigin-RevId:
184596877
Andy Kernahan [Mon, 5 Feb 2018 23:33:50 +0000 (23:33 +0000)]
Ensure bash is invoked as a login shell on windows otherwise fixups fail. (#16580)
Tod [Mon, 5 Feb 2018 23:30:17 +0000 (07:30 +0800)]
Fix the relative path issue of JNI lib loader (#16754)
Sergio Guadarrama [Mon, 5 Feb 2018 23:16:29 +0000 (15:16 -0800)]
Adding TensorSpec to represent the specification of Tensors.
PiperOrigin-RevId:
184594856
A. Unique TensorFlower [Mon, 5 Feb 2018 23:14:20 +0000 (15:14 -0800)]
Verify tflite model in TFLite Java API
PiperOrigin-RevId:
184594561
Mahesh Bhosale [Mon, 5 Feb 2018 23:15:12 +0000 (04:45 +0530)]
Resolve Programmatic mistake. (#16765)
SPECIES should have been either imported here or it should have referenced from iris_data. The corresponding code is correct but the conflict in the documentation.
Max Galkin [Mon, 5 Feb 2018 23:10:44 +0000 (15:10 -0800)]
Add logging to diagnose device properties parsing problem in Grappler.
PiperOrigin-RevId:
184594084
ManHyuk [Mon, 5 Feb 2018 23:11:17 +0000 (08:11 +0900)]
Fix typo (#16759)
* fix typo
* FIx Typo
Yu-Cheng Ling [Mon, 5 Feb 2018 23:05:43 +0000 (15:05 -0800)]
Fix CBLAS Conv reference implementation in TFLite.
PiperOrigin-RevId:
184592951
Alexandre Passos [Mon, 5 Feb 2018 22:47:23 +0000 (14:47 -0800)]
Automated g4 rollback of changelist
184573795
PiperOrigin-RevId:
184590080
Amit Patankar [Mon, 5 Feb 2018 22:48:51 +0000 (14:48 -0800)]
Merging the 1.6 branch back into master.
A. Unique TensorFlower [Mon, 5 Feb 2018 22:43:35 +0000 (14:43 -0800)]
Backward pass implementation for fusion optimizer.
PiperOrigin-RevId:
184589487
A. Unique TensorFlower [Mon, 5 Feb 2018 22:38:07 +0000 (14:38 -0800)]
[XLA] Fix documentation for Clamp.
PiperOrigin-RevId:
184588630
Peter Hawkins [Mon, 5 Feb 2018 22:12:02 +0000 (14:12 -0800)]
[TF:XLA] Implement GatherNd.
PiperOrigin-RevId:
184584104
Alexandre Passos [Mon, 5 Feb 2018 22:02:36 +0000 (14:02 -0800)]
Propagate the name on resource variable assign (#16714)
Yong Tang [Mon, 5 Feb 2018 22:01:26 +0000 (14:01 -0800)]
Fix incorrect reference DOI number/link for GDR (#16734)
This fix fixes the incorrect reference DOI number/link for GDR:
`https://doi.org/10.1145/3123878.3123907` -> `https://doi.org/10.1145/3123878.3131975`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Derek Murray [Mon, 5 Feb 2018 21:43:52 +0000 (13:43 -0800)]
[tf.data] Fix use-after-free bug when closing down an input pipeline.
This fix affects the distributed runtime; DirectSession use is unaffected.
Before this change, an iterator that used a background prefetching
thread might attempt to use a captured FunctionLibraryRuntime from a
subgraph that had been deregistered (and hence its
FunctionLibraryRuntime would have been deleted). This change
introduces a mechanism for "cloning" the necessary parts of the
FunctionLibraryRuntime so that it can be owned by the
IteratorResource.
PiperOrigin-RevId:
184579490
A. Unique TensorFlower [Mon, 5 Feb 2018 21:43:08 +0000 (13:43 -0800)]
[XLA] Add tests for Clamp of S32 and U32 vectors with broadcasted scalars.
PiperOrigin-RevId:
184579375
Yong Tang [Mon, 5 Feb 2018 21:43:21 +0000 (13:43 -0800)]
Fix the incorrect link to vulnerability reporting (#16778)
This fix fixes the incorrect link to vulnerability reporting.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Alexandre Passos [Mon, 5 Feb 2018 21:03:53 +0000 (13:03 -0800)]
Fixes issue where external control dependencies in while loops are dropped.
Fixes #15891
PiperOrigin-RevId:
184573795
Asim Shankar [Mon, 5 Feb 2018 20:40:51 +0000 (12:40 -0800)]
contrib/rnn: Fix #16703
(Bug introduced in
https://github.com/tensorflow/tensorflow/commit/
3f579020bab8f00e4621e9c7c740cbf13136a809)
Kudos to @akhti for pointing this out.
PiperOrigin-RevId:
184570448
A. Unique TensorFlower [Mon, 5 Feb 2018 20:16:04 +0000 (12:16 -0800)]
Bug fix: Don't dereference nullptr in OpKernelContext::input_alloc_attr().
PiperOrigin-RevId:
184566770
Yunxing Dai [Mon, 5 Feb 2018 20:15:10 +0000 (12:15 -0800)]
[TF:XLA] Making constant folding deterministic.
Making constant folding deterministic by doing DFS deterministically and inserting a serialization point based on nodes' names.
This is the last source of non-determinism remaining in the TF:XLA stack.
RELNOTES: Constant folding pass is now deterministic.
PiperOrigin-RevId:
184566644
Benoit Steiner [Mon, 5 Feb 2018 20:08:36 +0000 (12:08 -0800)]
Serialize the evaluation of the AssignAdd nodes to make the result more
deterministic
Improved testing
PiperOrigin-RevId:
184565483
Yao Zhang [Mon, 5 Feb 2018 19:23:40 +0000 (11:23 -0800)]
Support parsing from text and fused op in contrib.
PiperOrigin-RevId:
184558131
Joshua V. Dillon [Mon, 5 Feb 2018 18:45:33 +0000 (10:45 -0800)]
Automated g4 rollback of changelist
184323369
PiperOrigin-RevId:
184551259
A. Unique TensorFlower [Mon, 5 Feb 2018 18:39:18 +0000 (10:39 -0800)]
Proper reallocation of dynamic tensors.
PiperOrigin-RevId:
184550199
Dan Ringwalt [Mon, 5 Feb 2018 18:36:24 +0000 (10:36 -0800)]
Make flat_transforms_to_matrices and matrices_to_flat_transforms public (#781).
PiperOrigin-RevId:
184549704
Amit Patankar [Mon, 5 Feb 2018 18:16:02 +0000 (10:16 -0800)]
Changing the link to point to new android job.
PiperOrigin-RevId:
184546160
A. Unique TensorFlower [Mon, 5 Feb 2018 18:06:10 +0000 (10:06 -0800)]
[XLA] add Conditional to the local Python XLA client.
PiperOrigin-RevId:
184544483
Dan Ringwalt [Mon, 5 Feb 2018 17:49:01 +0000 (09:49 -0800)]
Clarify that tf.contrib.image.rotate angles are counterclockwise.
PiperOrigin-RevId:
184541776
A. Unique TensorFlower [Mon, 5 Feb 2018 17:33:42 +0000 (09:33 -0800)]
Enable aggressive identity node pruning in dependency optimizer.
PiperOrigin-RevId:
184539756
Skye Wanderman-Milne [Mon, 5 Feb 2018 16:41:54 +0000 (08:41 -0800)]
Get control_flow_ops.py ready to support de/serializing nested control flow.
With this change, ControlFlowContexts keep track of their nested
contexts (the reverse lookup as ControlFlowContext.outer_context).
This is to enable de/serializing the nested contexts of each "root"
context, and only adding the root contexts to collections. This allows
for simple deserialization of each root context by recursively
deserializing its nested contexts.
The de/serialization logic is disabled and the corresponding
control_flow.proto changes are omitted for now for forwards
compatability (i.e. three-week-old binaries must be ready to accept
the new proto format once its commited). After this is committed for
three weeks, I'll commit a follow-up change enabling the new behavior.
Design note: I chose to serialize the nested contexts, rather than the
outer contexts, because it makes it easy to deserialize the contexts
in topological order and to assign the right outer context. If we
serialized the outer contexts, there'd need to be some mechanism for
either sorting all the serialized contexts first, or deserializing all
of them and then doing another pass to assign the outer contexts.
PiperOrigin-RevId:
184533406
A. Unique TensorFlower [Mon, 5 Feb 2018 16:32:18 +0000 (08:32 -0800)]
Internal Change
PiperOrigin-RevId:
184532417
A. Unique TensorFlower [Mon, 5 Feb 2018 15:56:27 +0000 (07:56 -0800)]
Expand the activity analysis to composite names.
Fix a bug in the cond template that caused bad syntax when there it no symbol that needs aliasing.
More refactoring in the process, including:
* introduce the QN (qualified name) class to hold symbol information; it has value semantics and can generate the original symbol, a corresponding AST tree or a single-symbol form (e.g. "a.b" -> a_b)
* allow the template mechanism to use QNs for substitutions
* annotate *all* symbol nodes with their corresponding QN object; this is done as first step during static analysis, and automatically performed on all template expansions
* start using typed annotation keys (Enum values) instead of plain strings
* rename access.py to activity.py
* sanitize nodes in template expansion by deep copying the AST without annotations, to avoid common references
PiperOrigin-RevId:
184528586
A. Unique TensorFlower [Mon, 5 Feb 2018 09:42:16 +0000 (01:42 -0800)]
mini documentation fix
PiperOrigin-RevId:
184496843
A. Unique TensorFlower [Mon, 5 Feb 2018 09:03:32 +0000 (01:03 -0800)]
Fixed sequence_mask behavior on unknown shape.
`sequence_mask` crashed when fed with a tensor of unknown rank.
Added a test for that, and expanded a bit existing tests.
Also fixed pre-existing lint errors.
PiperOrigin-RevId:
184493239
A. Unique TensorFlower [Mon, 5 Feb 2018 03:58:18 +0000 (19:58 -0800)]
Support for quantized LSTM models.
PiperOrigin-RevId:
184476753
Yong Tang [Mon, 5 Feb 2018 04:01:28 +0000 (20:01 -0800)]
Fix logging format error in retrain.py (#16738)
This fix fixes the logging format error in
`tensorflow/examples/image_retraining/retrain.py`.
This fix fixes 16735.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
ManHyuk [Mon, 5 Feb 2018 00:23:07 +0000 (09:23 +0900)]
FIx Typo
ManHyuk [Mon, 5 Feb 2018 00:16:29 +0000 (09:16 +0900)]
Merge branch 'master' into fix_typo
Mingsheng Hong [Sun, 4 Feb 2018 19:54:35 +0000 (11:54 -0800)]
Minor fixes to the get started doc.
PiperOrigin-RevId:
184457074
Derek Murray [Sun, 4 Feb 2018 19:24:51 +0000 (11:24 -0800)]
Avoid retaining two copies of each constant in `ConstantOp`.
Presently, the kernel keeps two copies of the constant tensor value, which can be large:
1. In the `ConstantOp::tensor_` field.
2. In the `OpKernel::def_` field (as an attr of the `NodeDef`).
Since we can be sure that `ConstantOp` will never need to access the
tensor value from `OpKernel::def_`, this change introduces a mechanism
for `OpKernel` implementations to store a stripped `NodeDef` in the
base class, and uses it in `ConstantOp` to avoid storing the tensor
value attr.
PiperOrigin-RevId:
184455793
ManHyuk [Sun, 4 Feb 2018 18:49:48 +0000 (03:49 +0900)]
fix typo (#16722)
Rohin Mohanadas [Sun, 4 Feb 2018 14:42:33 +0000 (15:42 +0100)]
Grammatical error fixed (#16746)
Blake Hechtman [Sun, 4 Feb 2018 07:45:00 +0000 (23:45 -0800)]
[XLA] Assign mandatory constraints in a DFS order and non-manatory constraints in a BFS order.
PiperOrigin-RevId:
184429818
Amit Patankar [Sun, 4 Feb 2018 07:34:15 +0000 (23:34 -0800)]
Merge pull request #16744 from jhseu/windows_fix
Fix the Windows GPU build #2
Jonathan Hseu [Sun, 4 Feb 2018 06:02:53 +0000 (22:02 -0800)]
Fix the Windows GPU build #2
Amit Patankar [Sun, 4 Feb 2018 05:17:27 +0000 (21:17 -0800)]
Merge pull request #16741 from tensorflow/av8ramit-patch-1
Making the for_canonicalization_test only for py2
Amit Patankar [Sun, 4 Feb 2018 02:16:24 +0000 (18:16 -0800)]
Update BUILD
Amit Patankar [Sun, 4 Feb 2018 01:24:29 +0000 (17:24 -0800)]
Making the for_canonicalization_test only for py2
http://ci.tensorflow.org/view/Release/job/release-matrix-cpu/TF_BUILD_CONTAINER_TYPE=CPU,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/239/consoleFull
Rohin Mohanadas [Sat, 3 Feb 2018 23:22:48 +0000 (00:22 +0100)]
change to hyper link (#16690)
MandarJKulkarni [Sat, 3 Feb 2018 23:22:22 +0000 (04:52 +0530)]
Fixed a couple of typos (#16731)
Fixed a couple of typos
Amit Patankar [Sat, 3 Feb 2018 19:00:37 +0000 (11:00 -0800)]
Merge pull request #16729 from jhseu/bug_fixes
Fix the Windows GPU build
Jonathan Hseu [Sat, 3 Feb 2018 17:46:13 +0000 (09:46 -0800)]
Delete device_functions.h include.
RJ Ryan [Sat, 3 Feb 2018 17:46:31 +0000 (09:46 -0800)]
[tf-signal] Fix exception when input shape is unknown in mfccs_from_log_mel_spectrograms.
PiperOrigin-RevId:
184400783
Frank Chen [Sat, 3 Feb 2018 17:38:43 +0000 (09:38 -0800)]
Merge pull request #16726 from jhseu/branch_184376425
Branch
184376425
Jonathan Hseu [Sat, 3 Feb 2018 13:38:13 +0000 (05:38 -0800)]
Merge commit for internal changes
ManHyuk [Sat, 3 Feb 2018 09:39:42 +0000 (18:39 +0900)]
fix typo
A. Unique TensorFlower [Sat, 3 Feb 2018 07:02:16 +0000 (23:02 -0800)]
[XLA] Add tests for Clamp with scalars S32 and U32.
PiperOrigin-RevId:
184376425
Yu-Cheng Ling [Sat, 3 Feb 2018 06:39:45 +0000 (22:39 -0800)]
Fix breakage: Can't build TFLite with Bazel for Mac / iOS.
PiperOrigin-RevId:
184375534
A. Unique TensorFlower [Sat, 3 Feb 2018 03:40:30 +0000 (19:40 -0800)]
A more efficient implementation of the Op using batch operations.
PiperOrigin-RevId:
184367562
Mingsheng Hong [Sat, 3 Feb 2018 03:10:39 +0000 (19:10 -0800)]
Extended TFE_OpSetDevice() with the ability to set an op device from non-GPU back to GPU.
Added unit testing, and also refined unit test logic for checking the presence
of a GPU device. The latter is needed when we add XLA device support.
PiperOrigin-RevId:
184366172
Justin Lebar [Sat, 3 Feb 2018 02:57:10 +0000 (18:57 -0800)]
[XLA] Minor cleanups related to multi-output fusion.
- Add some comments about preexisting invariants, and add some CHECKs.
- In the LoopEmitter constructor, materialize the given
ArraySlice<IrArray> to a vector, so we don't rely on the given
ArraySlice having any particular lifetime.
- Add the invariant that the LoopEmitter constructor which takes a
list of IrArrays is only for multi-output fusion. Previously it said:
If you only pass one array, then treat it as regular fusion. But this
results in an LLVM type mismatch, because the given
target_element_generator should be passing a struct with one element.
PiperOrigin-RevId:
184365310
A. Unique TensorFlower [Sat, 3 Feb 2018 02:03:11 +0000 (18:03 -0800)]
Propagate outfeed sharding, if specified from TensorFlow.
PiperOrigin-RevId:
184361221
Anna R [Sat, 3 Feb 2018 01:59:16 +0000 (17:59 -0800)]
Automated g4 rollback of changelist
184347012
PiperOrigin-RevId:
184360818
Jonathan Hseu [Sat, 3 Feb 2018 01:40:59 +0000 (17:40 -0800)]
Merge pull request #16715 from jhseu/branch_184352399
Branch
184352399
Derek Murray [Sat, 3 Feb 2018 01:09:59 +0000 (17:09 -0800)]
[tf.data] Add public header "tensorflow/core/framework/dataset.h".
This adds the ability to create a custom C++ Dataset implementation
without linking it statically into the TensorFlow library. Note that
this internal API is experimental and subject to change between
versions of TensorFlow.
Fixes #16682.
PiperOrigin-RevId:
184356318
Derek Murray [Sat, 3 Feb 2018 01:09:16 +0000 (17:09 -0800)]
Check that the type of an implicitly dereferenced tensor matches the expected input type.
The dtype of a tensor reference can change between the point when it is "produced" by an
operation and consumed by the next operation. This evades checks in the executor that the
type of tensor on each edge matches the type signatures of the producing and consuming operation, which could lead to undefined behavior. Although there is no existing operation that changes the type of a tensor reference, it is possible to use the OpKernelContext API to do so, so we add a further check in the runtime to defend against operations that might be added in the future.
PiperOrigin-RevId:
184356242
Jonathan Hseu [Sat, 3 Feb 2018 00:55:56 +0000 (16:55 -0800)]
Merge commit for internal changes
DosLin [Sat, 3 Feb 2018 00:39:18 +0000 (08:39 +0800)]
Fix docs (#16653)
Jonathan Hseu [Sat, 3 Feb 2018 00:35:10 +0000 (16:35 -0800)]
Update global_step by default if the user specifies a host_call.
PiperOrigin-RevId:
184352399
ManHyuk [Sat, 3 Feb 2018 00:38:55 +0000 (09:38 +0900)]
fix typo (#16679)
Yong Tang [Sat, 3 Feb 2018 00:37:50 +0000 (16:37 -0800)]
Convert unicode to six.string_types for python 3 (#16676)
In Python 3, there is no unicode type. This fix converts
unicode to use six.string_types instead, while maintaining
python 2/3 compatibility.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>