Skip to content
Advertisement

Split .tfrecords file into many .tfrecords files

Is there any way to split .tfrecords file into many .tfrecords files directly, without writing back each Dataset example ?

Advertisement

Answer

You can use a function like this:

JavaScript

For example, to split the file my_records.tfrecord into parts of 100 records each, you would do:

JavaScript

This would create multiple smaller record files my_records.tfrecord.000, my_records.tfrecord.001, etc.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement