v0.3.1
What's changed
- Simplified imports - can now directly import accumulators without middle step
- Renamed
GAModelWrapper
->GradientAccumulateModel
- Renamed
GAOptimizerWrapper
->GradientAccumulateOptimizer
- Updated README and all CIs accordingly
- Deprecated
tensorflow==2.2
, due totensorflow-addons
incompatiblity. Nowtf >= 2.3
supported.
Full Changelog: v0.3.0...v0.3.1
How to install?
pip install gradient-accumulator==0.3.1
New API!
Model wrapper:
from gradient_accumulator import GradientAccumulateModel
model = Model(...)
model = GradientAccumulateModel(accum_steps=4, inputs=model.input, outputs=model.output)
Optimizer wrapper:
from gradient_accumulator import GradientAccumulateModel
opt = tf.keras.optimizers.SGD(1e-2)
opt = GradientAccumulateOptimizer(accum_steps=4, optimizer=opt)