Do I need to pad?
See original GitHub issueExcuse me for the noob question, I have sequences of different lengths and I use:
model = AutoregressiveWrapper(model, ignore_index=PAD_ID, pad_value=PAD_ID)
Do I need to pad as in this example or not?
def __getitem__(self, index):
seq_tokens = self.examples[index]
input_ids = torch.tensor(seq_tokens, dtype=torch.long)
input_ids = F.pad(input_ids, (seq_len - len(input_ids), 0), value=self.pad_value)
return input_ids
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How Often Should You Change Your Pad? - Healthline
The American College of Obstetricians and Gynecologists (ACOG) recommends changing your pad at least every 4 to 8 hours, but that's just a ......
Read more >Do I Have PAD? Take Our Self Assessment Quiz
Do I Have PAD? Take Our Self Assessment Quiz ... PAD: Peripheral Artery Disease: A build-up of plaque in the arteries reducing blood...
Read more >Can I Wear the Same Pad All Day? (for Teens) - Kids Health
Changing your pad every 3 or 4 hours (more if your period is heavy) is good hygiene and helps prevent bad odors.
Read more >Tampons Vs. Pads: Pros, Cons, and Which Is Better for You
Pads have the advantages of being easy to use and better for heavy periods, but you can't swim in them and they may...
Read more >Can you wear pads all the time or only on your period? - Kotex
As long as you change them regularly, you can definitely wear pads all the time. I'm just not sure why you would want...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Haha, that would be awesome, thanks a lot!
EDIT: R.
Great (: