-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add python API for Warp-CTC op #7438
Conversation
python/paddle/v2/fluid/layers/nn.py
Outdated
|
||
def warpctc(input, label, blank=0, norm_by_times=False, **kwargs): | ||
""" | ||
An operator integrating the open source warp-ctc library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- warp-ctc library -> Warp-CTC library, and URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Done.
python/paddle/v2/fluid/layers/nn.py
Outdated
""" | ||
An operator integrating the open source warp-ctc library | ||
to compute Connectionist Temporal Classification (CTC) loss. | ||
It can be aliased as softmax with ctc, since a native softmax activation is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctc -> CTC in all doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Done.
python/paddle/v2/fluid/layers/nn.py
Outdated
of variable-length sequence, which is a 2-D Tensor with LoD | ||
information. It is of the shape [Lg, 1], where Lg is th sum of | ||
all labels' length. | ||
blank: (int, default: 0), the blank label of Connectionist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the blank label -> the blank label index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Fixed.
python/paddle/v2/fluid/layers/nn.py
Outdated
Temporal Classification (CTC) loss, which is in the | ||
half-opened interval [0, num_classes + 1). | ||
norm_by_times: (bool, default: false), whether to | ||
normalize the gradients by the number of time-step, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there is no need to normalize the gradient since there is always a mean_op
after the loss. Need to pay attention to this, when verifying the model.
No description provided.