Hi @pgmmpk. Thanks for sharing this solution. I just have a question about your code:


In this code what package do you use for “from tfrecord import Writer” ? I couldn’t find this package nor in tensorflow official package.


Could you also elaborate, or have some examples, on how to interface tfrecord and pytorch dataloader? Thanks!



  
      github.com
  
  
    pgmmpk/tfrecord/blob/master/tfrecord/test/test_tfrecord.py 200
import pytest
from tfrecord import (
    Writer, Reader,
    pack_int64_list, unpack_int64_list,
    pack_float_list, unpack_float_list,
    pack_bytes_list, unpack_bytes_list,
)

SAMPLES = [
    {
        'int_sample'  : [1, 2, 3],
        'float_sample': [0.1, 0.2, 0.3],
        'byte_sample' : [b'1', b'2', b'3']
    },
    {
        'int_sample'  : [4, 5],
        'float_sample': [0.4],
        'byte_sample' : [b'hello', b'world!']
    },
]


  This file has been truncated. show original