band/progress.py
def decode_record(record, features):
        """Decodes a record to a TensorFlow example."""
        example = tf.io.parse_single_example(record, features)

        # tf.Example only supports tf.int64, but the TPU only supports tf.int32.
        # So cast all int64 to int32.
        for name in list(example.keys()):
            t = example[name]
            if t.dtype == tf.int64:
                t = tf.cast(t, tf.int32)
            example[name] = t
        return example
Decodes a record to a TensorFlow example.
Decodes a record to a TensorFlow example.
Decodes a record to a TensorFlow example .
def decode_record(record, features):
        example = tf.io.parse_single_example(record, features)
        for name in list(example.keys()):
            t = example[name]
            if t.dtype == tf.int64:
                t = tf.cast(t, tf.int32)
            example[name] = t
        return example
def decode_record ( record , features ) : example = tf . io . parse_single_example ( record , features ) for name in list ( example . keys ( ) ) : t = example [ name ] if t . dtype == tf . int64 : t = tf . cast ( t , tf . int32 ) example [ name ] = t return example
Decodes a record to a TensorFlow example.
Decodes a record to a TensorFlow example .
"""Decodes a record to a TensorFlow example.""" # tf.Example only supports tf.int64, but the TPU only supports tf.int32. # So cast all int64 to int32.
record
features