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

Commit 5e32d31

Browse files
epurdyCopybara-Service
authored andcommitted
Merge of PR #1440
PiperOrigin-RevId: 233438227
1 parent f1076df commit 5e32d31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tensor2tensor/utils/t2t_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,8 @@ def summarize_features(features, num_shards=1):
20172017

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

0 commit comments

Comments
 (0)