spaGO v0.7.0 Release Notes

Release Date: 2021-05-24 // 5 months ago
  • โž• Added

    • ๐Ÿ†• New package ml/ag/encoding/dot, for simple serialization of a Graph to DOT (Graphviz) format.
    • ๐Ÿ†• New package ml/nn/sgu, implementing a Spatial Gating Unit (SGU) model.
    • ๐Ÿ†• New package ml/nn/conv1x1, implementing a simple 1-dimensional 1-sized-kernel convolution model.
    • ๐Ÿ†• New package ml/nn/gmlp, implementing a gMLP model.

    ๐Ÿ”„ Changed

    • ml/nn/activation/Model.Forward now simply returns the input as it is if the activation function is the identity.

Previous changes from v0.6.0

  • โž• Added

    • ml/losses.WeightedCrossEntropy()
    • ml/losses.FocalLoss()
    • ml/losses.WeightedFocalLoss()
    • nlp/sequencelabeler.LoadModel() (it replaces Load() and LoadEmbeddings())
    • nlp/charlm.LoadModel()
    • nlp/transformers/bert.Model.PredictMLM()
    • ๐Ÿ“ฆ nlp/transformers/bart/tasks package
    • nlp/transformers/bert.Model.Vectorize()
    • ml/ag.Graph.Nodes() and ml/ag.Nodes()
    • ml/nn.Model.Close()
    • ml/nn.ReifyForTraining() and ml/nn.ReifyForInference()
    • ml/ag.Graph.Backward() now panics if it is executed with nodes belonging to different graphs.
    • ๐Ÿ“ฆ The new ml/graphviz package allows exporting a Graph to Graphviz DOT format. To make it possible, we introduced a new go-mod dependency gographviz.
    • A custom name can be optionally set to a Graph's Variables. This can be useful for debugging purposes and visual graph representation. You can now use Graph.NewVariableWithName() and Graph.NewScalarWithName() to create named Variables, and get the name of a Variable with Variable.Name().

    ๐Ÿ”„ Changed

    • ๐Ÿ“ฆ All UnaryElementwise functions provided by the package ag/fn have been promoted to separate dedicated structs. This improves debuggability and you can get appropriate function names when using reflection. Here is the full list of the modified functions: Tan, Tanh, Sigmoid, HardSigmoid, HardTanh, ReLU, Softsign, Cos, Sin, Exp, Log, Neg, Reciprocal, Abs, Mish, GELU, Sqrt, Swish. For the same reason, a dedicated Square function is introduced, replacing Prod with both operands set to the same value.
    • ml/ag types Operator, Variable, Wrapper are now public.
    • ml/nn.Reify() now expects a Graph and a Processing Mode arguments instead of a Context object (removed).
    • ml/nn.BaseModel has been modified, replacing the field Ctx Context with a direct reference to the model's Graph and the Processing Mode (fields G and ProcessingMode).
    • โ™ป๏ธ Refactoring server implementation of nlp/sequencelabeler, nlp/transformers/bert, and nlp/transformers/bart.
    • โฌ†๏ธ Upgrade various dependencies.
    • Regenerate protocol buffers files (with protoc-gen-go v1.26.0 and protoc v3.16.0).

    โœ‚ Removed

    • nlp/sequencelabeler.Load() and LoadEmbeddings() (now replaced by nlp/sequencelabeler.LoadModel())
    • ๐Ÿ‘€ ml/nn.Context (see related changes on Reify() and BaseModel)