Feeding .npy (numpy files) into tensorflow data pipeline

It is actually possible to read directly NPY files with TensorFlow instead of TFRecords. The key pieces are tf.data.FixedLengthRecordDataset and tf.io.decode_raw, along with a look at the documentation of the NPY format. For simplicity, let’s suppose that a float32 NPY file containing an array with shape (N, K) is given, and you know the number … Read more