-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow arbitrary dimension numbers in stax layers.
* Note that FC / GlobalAvgPool layers will still enforce `NC` dimension numbers for now, and * batching still only works with the leading batch (`N`) dimension, so keeping `N` as leading dimension is highly recommended. * `NHWC` is recommended currently for attention, `NCHW` or `NHWC` for CNNs. Also: 1) Remove some warnings that I feel are redundant given our codebase - please let me know if I'm wrong. 2) Make the code slightly more generic, hopefully facilitating future ND-cnn cases. 3) Make `Flatten` work on batches of size 0. 4) Make `GeneralConv` public as it now supports different dimension numbers. PiperOrigin-RevId: 290168022
- Loading branch information
Showing
6 changed files
with
265 additions
and
5,172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.