Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Fix for string features #1440

Merged
merged 1 commit into from
Feb 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensor2tensor/utils/t2t_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ def summarize_features(features, num_shards=1):

with tf.name_scope("input_stats"):
for (k, v) in sorted(six.iteritems(features)):
if isinstance(v, tf.Tensor) and v.get_shape().ndims > 1:
if isinstance(v, tf.Tensor) and v.get_shape().ndims > 1 and v.dtype != tf.string:
tf.summary.scalar("%s_batch" % k, tf.shape(v)[0] // num_shards)
tf.summary.scalar("%s_length" % k, tf.shape(v)[1])
nonpadding = tf.to_float(tf.not_equal(v, 0))
Expand Down