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

scale activations in DropPath #66

Merged
merged 2 commits into from
Dec 22, 2022
Merged

scale activations in DropPath #66

merged 2 commits into from
Dec 22, 2022

Conversation

eringrant
Copy link
Contributor

Great project! An additional test + a small fix to align DropPath with standard dropout and torchvision.stochastic_depth.

@paganpasta
Copy link
Owner

Hey, thanks for the PR.

I was thinking maybe the mode values change to 'batch, rows' will also be beneficial. What do you think?

@eringrant
Copy link
Contributor Author

For the longer term, I think it makes sense to make equinox.nn.dropout upstream more expressive to handle things like mode = global (as here), or tiled dropout (as handled here, for example). (But of course, this repo is not the place to propose changes to another repo. :)

For the shorter term, I prefer an API that refers to axes by index rather than by their expected semantics. So for example, rather than expecting rows to be meaningful for every input value to eqxvision.layers.DropPath.__call__, I prefer to identify by index the axes over which to broadcast the dropout mask (similarly to the tiled dropout implementation above).

@paganpasta
Copy link
Owner

That makes sense. It might be beneficial to raise an issue at Equinox for this extension.

For the shorter term, I prefer an API that refers to axes by index rather than by their expected semantics...

Agreed. I'd be happy to accept a PR on this.

@paganpasta paganpasta merged commit b6a9861 into paganpasta:dev Dec 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants