Comments (7)
reshuffle_each_iteration
is False
by default? I guess this is a great example of why implicit random seeds are evil.
In the past I have also noticed that creating iterators in tf.data
tends to come with significant overhead so I prefer to create one infinite iterator and use a manual for step in range(steps_per_epoch)
to loop for an epoch. This also avoids some other issues like partial batches.
from flax.
Just checked, it actually does default to True
:
reshuffle_each_iteration: (Optional.) A boolean, which if true indicates that the dataset should be pseudorandomly reshuffled each time it is iterated over. (Defaults to True.)
Perhaps the issue is that the nlp_seq
example does not shuffle the data?
from flax.
Marking as PR welcome. A successful PR would also include (a link to) new TensorBoard logs verifying the metrics (see README.md
in examples/nlp_seq
for expected numbers).
from flax.
It looks like dataset.shuffle was just missing. I've made the change. I'll train on a V100 similar to the README and submit a PR with updated logs and code. I've checked other example folders. Others don't miss the shuffle to the training dataset. Please correct if I'm wrong.
from flax.
Awesome @gan3sh500 ! Indeed if you can reproduce the same results on a V100 and share a link to tensorboard.dev we'll merge your PR.
from flax.
Sorry for slow turnaround. I didn't get the V100 but I now have a 2080Ti locally to run and have ran the same batch_size and iterations. The results are 0.23% lower than the one shown in the repo. Please see for yourself. TB Dev #321
from flax.
It looks like @bohnetbd felt this wasn't worth adding due to the added complexity (given that this is an educational example). So I am closing this.
from flax.
Related Issues (20)
- Feature request: Mixture of Experts example HOT 1
- Significant performance difference of NNX relative to equinox HOT 16
- typo in nnx_basics.md HOT 3
- Opaque XLA crash when initializing model HOT 1
- Is there anyway to analyze activations in flax? HOT 1
- Docs: please clarify how to vmap nnx.Module over batch dimension HOT 3
- Dropout seems not compatible with jax.jit HOT 1
- GroupNorm missing from NNX normalization layer HOT 2
- Large Difference in Loss between JAX and FLAX Two-Layer Linear Autoencoder HOT 1
- NNXWrapper HOT 2
- Truncated Normal initializer doesn't match PyTorch HOT 2
- lowering / cost analysis of @nnx.jit functions HOT 1
- Performance penalty of typecast in `nn.Embed.__call__`
- JAX-style NNX Transforms
- Edit parameters of flax module in another module HOT 2
- Flax.linen.conv unexpected behavior. HOT 1
- `DynamicScale` behaves unexpected when computing per-sample gradients with `vmap`.
- bias and kernel params are put on different gpu devices
- [nnx] How to access the nnx.Param which is inside of the Module HOT 2
- MNIST tutorial broken for Colab TPU
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flax.