Skip to content

Commit

Permalink
🚀 Fixed tfrecords and summary
Browse files Browse the repository at this point in the history
  • Loading branch information
nglehuy committed Dec 20, 2020
1 parent 1bad037 commit dbe95e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

setuptools.setup(
name="TensorFlowASR",
version="0.5.2",
version="0.5.3",
author="Huy Le Nguyen",
author_email="[email protected]",
description="Almost State-of-the-art Automatic Speech Recognition using Tensorflow 2",
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_asr/datasets/asr_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ def create_tfrecords(self):
if not os.path.exists(self.tfrecords_dir):
os.makedirs(self.tfrecords_dir)

entries = self.read_entries()
if len(entries) <= 0:
return False

if glob.glob(os.path.join(self.tfrecords_dir, f"{self.stage}*.tfrecord")):
print(f"TFRecords're already existed: {self.stage}")
return True

print(f"Creating {self.stage}.tfrecord ...")

entries = self.read_entries()
if len(entries) <= 0:
return False

def get_shard_path(shard_id):
return os.path.join(self.tfrecords_dir, f"{self.stage}_{shard_id}.tfrecord")

Expand Down
1 change: 0 additions & 1 deletion tensorflow_asr/models/transducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ def _build(self, input_shape):
self([inputs, input_length, pred, pred_length], training=False)

def summary(self, line_length=None, **kwargs):
self.encoder.summary(line_length=line_length, **kwargs)
self.predict_net.summary(line_length=line_length, **kwargs)
self.joint_net.summary(line_length=line_length, **kwargs)
super(Transducer, self).summary(line_length=line_length, **kwargs)
Expand Down

0 comments on commit dbe95e7

Please sign in to comment.