-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
Augment a batch of texts with Contextual Word Embeddings Augmenters #146
Comments
There are 2 possible causes. The first scenario is 1 input and multiple outputs. The second scenario is a list of input and output is the same size as the input. For the first case, you can use something like this one with augment function For the second case, you can use
Just added a sample code. You may take a look |
Thanks for your response. My scenario is the second one. I took a look at the code, and it seems that the |
Will enhance to support a single forward pass for multiple inputs per augmentation in order to speed up the process. For multiple input cases, it will definitely speed up the process. From my testing, it speeds up around 3x when augmenting 3 inputs. However, it still needs to go through augmentation one by one per input. For example, we have input "A B C D E" and we want to augment B and D. To prevent grammatical mistakes, it will augment B and then D. In order words, there is 2 single forward pass for B and D respectively. The process is like that if we augment two words (B and D): For multiple inputs, the process is like: |
Fixed in 1.0.0 version |
@makcedward is it also fixed in latest version? |
@rajat-tech-002 You can
|
Hi,
Thank you for this excellent library.
Is it possible to augment a batch of texts with contextual word augmenters? I try to use this type of augmenter during the training, and augmenting examples one by one is frustrating. I appreciate any suggestions.
Thanks!
The text was updated successfully, but these errors were encountered: