Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding non-shared BLSTM layers in CTC #173

Closed
wants to merge 5 commits into from

Conversation

sw005320
Copy link
Contributor

No description provided.

@sw005320
Copy link
Contributor Author

I'm observing some small improvement when I added a non-shared BLSTM layer before the CTC objective.

# ctc
parser.add_argument('--ctype', default='warpctc', type=str,
choices=['warpctc', 'chainer', 'blstm'],
help='Type of CTC architecture.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name blstm is a little bit confusing.
How about adding non-shared layer when clayers > 0 while keeping ctype=warpctc?

hy, cy, hs = self.nblstm(None, None, hs)
hs = self.l_last(F.vstack(hs)) # (sum _utt frame_utt) x dim
hs = F.split_axis(hs, np.cumsum(ilens[:-1]), axis=0)
del hy, cy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_, _, hs = self.nblstm(None, None, hs)

hy, cy, hs = self.nblstm(None, None, hs)
hs = self.l_last(F.vstack(hs)) # (sum _utt frame_utt) x dim
hs = F.split_axis(hs, np.cumsum(hlen[:-1]), axis=0)
del hy, cy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_, _, hs = self.nblstm(None, None, hs)


hpack = pack_padded_sequence(hpad, ilens, batch_first=True)
hs, (hy, cy) = self.nblstm(hpack)
del hy, cy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hs, _ = self.nblstm(hpack)


hpack = pack_padded_sequence(hpad, ilens, batch_first=True)
hs, (hy, cy) = self.nblstm(hpack)
del hy, cy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hs, _ = self.nblstm(hpack)

@sw005320 sw005320 changed the title added a new CTC type that has non-shared BLSTM layers adding non-shared BLSTM layers in CTC May 16, 2018
@kan-bayashi
Copy link
Member

LGTM
But if you want to make more coherent, please make it to be compatible with clayers options in using CTC of chainer.

@stale
Copy link

stale bot commented Aug 27, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale For probot label Aug 27, 2018
@stale
Copy link

stale bot commented Sep 29, 2018

This issue is closed. Please re-open if needed.

@stale stale bot closed this Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale For probot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants