Skip to content

v0.3.1

Compare
Choose a tag to compare
@andreped andreped released this 29 Jan 22:37
· 385 commits to main since this release

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 to tensorflow-addons incompatiblity. Now tf >= 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)