We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dac9610 commit 1f4f28cCopy full SHA for 1f4f28c
tensor2tensor/utils/t2t_model.py
@@ -2017,7 +2017,8 @@ def summarize_features(features, num_shards=1):
2017
2018
with tf.name_scope("input_stats"):
2019
for (k, v) in sorted(six.iteritems(features)):
2020
- if isinstance(v, tf.Tensor) and v.get_shape().ndims > 1:
+ if (isinstance(v, tf.Tensor) and (v.get_shape().ndims > 1) and
2021
+ (v.dtype != tf.string)):
2022
tf.summary.scalar("%s_batch" % k, tf.shape(v)[0] // num_shards)
2023
tf.summary.scalar("%s_length" % k, tf.shape(v)[1])
2024
nonpadding = tf.to_float(tf.not_equal(v, 0))
0 commit comments