Changelog#
New in 0.7.0#
Ability to configure any learn rate using
helixnet.optimizers.LearnRateAdded Exponential Learn Rate decay
helixnet.optimizers.ExpDecayAdded linear Learn Rate decay
helixnet.optimizers.LinearDecayOptimizers now can accept a float as a constant learn rate or
helixnet.optimizers.LearnRate
Breaking Changes in 0.7.0#
Now removed
get_current_lrmethod anddecayargument in all optimizers
New in 0.6.1#
Switch to hatch as a build system
The
__version__is in__init__and used to be shared across build system and documentation
New in 0.6.0#
- Automatic training loop with live views that shows the loss
in realtime and also supports validation metrics
New
helixnet.metrics- New losses
helixnet.metrics.BinaryCrossEntropy() helixnet.metrics.CosineSimilarityLoss()helixnet.metrics.HingeLoss()helixnet.metrics.FocalLoss()helixnet.metrics.LogCoshLoss()helixnet.metrics.HuberLoss()
- New losses
helixnet.models.Sequential.summaryuses rich tables
New in 0.5.1#
Fixed a bug in loading the models
Added
helixnet.layer.Layer.populate_self
New in 0.5.0#
Now
helixnet.layers.Layercan determine the name of layer automaticallyAdded the ability to save layers and get their configuration from
__init__methodAdded the ability to save & load
helixnet.models.SequentialAdded
helixnet.layers.ReshapeMigrated the tests to pytest
Added new module
helixnet.iofor saving and loadinghelixnet.models.Sequential
Breaking Changes#
Now helixnet.layers.Layer doesn’t accept the type of the layer
New in 0.4.0#
Added
helixnet.layers.BatchNormfor batch normalizationAdded
helixnet.layers.Dropoutfor dropping out some featuresAdded new optimizer
helixnet.optimizers.NesterovSGDfor applying nesterov trick on momentumhelixnet.optimizers.SGDAdded gradient clipping in
helixnet.optimizers.Optimizer
New in 0.3.0#
Added support for regularizers which introduced
Added new class
helixnet.optimizer.RegularizerCreated
helixnet.optimizer.L1&helixnet.optimizer.L2
- refactored the logic of
helixnet.optimizer.Optimizer which itself handles
helixnet.optimizer.Regularizer
- refactored the logic of
Now
helixnet.layers.Layer.predictworks correctlyWith
helixnet.layers.Layer.predictyou can use the model for inference with out building a computational graph
Breaking changes#
0.3.0 has introduced many breaking changes like
renamed the module
optimisertohelixnet.optimizerrenamed the ABC class
optimisertohelixnet.optimizer.Optimizerrenamed
Optimizer.optimisetohelixnet.optimizer.Optimizer.optimizehelixnet.optimizer.Optimizer.optimizenow needs the loss to be passedThe loss to be passed without Performing the backpropagation on the loss a.k.a (
loss_val.backward())- If your have written a custom optimizer with a custom training loop through
helixnet.optimizer.Optimizer.optimizeyou’ll need to write to handle the regularization. But if you didn’t write a custom loop your optimizer will be fully compatible
the training should be as follows
optim = helixnet.optimizers.SGD(0.1, None, 0.9)
# Forward pass produces logits (raw scores)
logits = model.forward(x)
# The loss function takes logits and integer labels
loss_value = mg.nnet.losses.softmax_crossentropy(logits, y_true)
# You should call `item` instead of saving the loss itself
# Because it's value will be changed by regularizer
loss_history.append(loss_value.item())
optim.optimize(model, loss_value)
# Clear grads for the next iteration
5. Inheriting helixnet.optimizers.Optimizer now needs learn rate and
a list of regularizers to be passed.