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

1d Attention Example / recommendation #11

Open
ragulpr opened this issue Jan 3, 2025 · 0 comments
Open

1d Attention Example / recommendation #11

ragulpr opened this issue Jan 3, 2025 · 0 comments

Comments

@ragulpr
Copy link
Owner

ragulpr commented Jan 3, 2025

Would be nice with an example to be used with attention. I have experimented but I'm not up to date enough to know what the most popular approach for compression / pruning / regularization is. Preferrably I'd rewrite this section to be useful with attention rather than RNN's as they are out:

taildropout/README.md

Lines 88 to 101 in 5ed14a0

#### Sequences
"Recurrent dropout" == Keep mask constant over time. Popular approach.
```
x = torch.randn(n_timesteps,n_sequences,n_features)
gru = nn.GRU(n_features,n_features)
taildropout = TailDropout(batch_dim = 1, dropout_dim = 2)
x, _ = gru(x)
x = taildropout(x)
```
If you want to have mask vary for each timestep and sequence
```
taildropout = TailDropout(batch_dim = [0,1], dropout_dim = 2)

Ref #10 also see #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant