GitXplorerGitXplorer
j

tfrecord_lite

public
87 stars
7 forks
0 issues

Commits

List of commits on branch master.
Verified
77cafa8ed5f03bf470013302ec909a3099f2d9ef

0.0.8

jjongwook committed a year ago
Verified
8d6b496d4106a1460d1ee3cf590073180af7b4ea

Merge pull request #4 from hauntsaninja/py311manife

jjongwook committed a year ago
Unverified
140ae355105a1d754d277f100c91c3312fd69278

Include pyproject.toml in MANIFEST.in

hhauntsaninja committed a year ago
Verified
23403099684d097a3e186f18ede6249bf81b83b8

Merge pull request #3 from hauntsaninja/py311

jjongwook committed a year ago
Unverified
2b4224848d161a88dbee33b9f174a601b901f16d

Declare Cython build dependency in pyproject.toml

hhauntsaninja committed a year ago
Unverified
83b98bb2d0e369b9c5f7976f607639a0c2cda2b1

Update tfrecord_lite.cpp

hhauntsaninja committed a year ago

README

The README file for this repository.

tfrecord_lite

This is a simple library to parse .tfrecord files without having to use TensorFlow, so that it is easier to use in a framework-agnostic way. It is written using nanopb and Cython.

In [1]: from tfrecord_lite import tf_record_iterator
   ...:
   ...: it = tf_record_iterator('nsynth-test.tfrecord')
   ...: next(it)
   ...:
Out[1]:
{'audio': array([ 3.8138387e-06, -3.8721851e-06,  3.9331076e-06, ...,
        -3.6526076e-06,  3.7041993e-06, -3.7578957e-06], dtype=float32),
 'instrument': array([417], dtype=int64),
 'instrument_family': array([0], dtype=int64),
 'instrument_family_str': [b'bass'],
 'instrument_source': array([2], dtype=int64),
 'instrument_source_str': [b'synthetic'],
 'instrument_str': [b'bass_synthetic_033'],
 'note': array([149013], dtype=int64),
 'note_str': [b'bass_synthetic_033-100-100'],
 'pitch': array([100], dtype=int64),
 'qualities': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int64),
 'sample_rate': array([16000], dtype=int64),
 'velocity': array([100], dtype=int64)}

Install

pip install tfrecord_lite

TODO

  • encoder/writer