spaGO v0.6.0 Release Notes
Release Date: 2021-05-13 // almost 3 years ago-
โ Added
ml/losses.WeightedCrossEntropy()
ml/losses.FocalLoss()
ml/losses.WeightedFocalLoss()
nlp/sequencelabeler.LoadModel()
(it replacesLoad()
andLoadEmbeddings()
)nlp/charlm.LoadModel()
nlp/transformers/bert.Model.PredictMLM()
- ๐ฆ
nlp/transformers/bart/tasks
package nlp/transformers/bert.Model.Vectorize()
ml/ag.Graph.Nodes()
andml/ag.Nodes()
ml/nn.Model.Close()
ml/nn.ReifyForTraining()
andml/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()
andGraph.NewScalarWithName()
to create named Variables, and get the name of a Variable withVariable.Name()
.
๐ Changed
- ๐ฆ All
UnaryElementwise
functions provided by the packageag/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 dedicatedSquare
function is introduced, replacingProd
with both operands set to the same value. ml/ag
typesOperator
,Variable
,Wrapper
are now public.ml/nn.Reify()
now expects a Graph and a Processing Mode arguments instead of aContext
object (removed).ml/nn.BaseModel
has been modified, replacing the fieldCtx Context
with a direct reference to the model's Graph and the Processing Mode (fieldsG
andProcessingMode
).- ๐จ Refactoring server implementation of
nlp/sequencelabeler
,nlp/transformers/bert
, andnlp/transformers/bart
. - โฌ๏ธ Upgrade various dependencies.
- Regenerate protocol buffers files (with
protoc-gen-go
v1.26.0 andprotoc
v3.16.0).
โ Removed
nlp/sequencelabeler.Load()
andLoadEmbeddings()
(now replaced bynlp/sequencelabeler.LoadModel()
)- ๐
ml/nn.Context
(see related changes onReify()
andBaseModel
)