Skip to content

Commit

Permalink
Merge pull request #230 from wipsel/228-rename-get-version-methods
Browse files Browse the repository at this point in the history
Renamed all version getters #228
  • Loading branch information
wipsel authored Dec 22, 2024
2 parents 3ea18cc + c0bbd0e commit 5c05450
Show file tree
Hide file tree
Showing 59 changed files with 115 additions and 115 deletions.
2 changes: 1 addition & 1 deletion ops/abs/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var absVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newAbs, 13, absTypeConstraint),
}

func GetAbsVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return absVersions
}
2 changes: 1 addition & 1 deletion ops/acos/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var acosVersions = ops.OperatorVersions{
7: newAcos,
}

func GetAcosVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return acosVersions
}
2 changes: 1 addition & 1 deletion ops/acosh/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var acoshVersions = ops.OperatorVersions{
9: newAcosh,
}

func GetAcoshVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return acoshVersions
}
2 changes: 1 addition & 1 deletion ops/add/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var addVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newAdd, 13, addTypeConstraints),
}

func GetAddVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return addVersions
}
2 changes: 1 addition & 1 deletion ops/and/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var andVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newAnd, 7, andTypeConstraints),
}

func GetAndVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return andVersions
}
2 changes: 1 addition & 1 deletion ops/argmax/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var argMaxVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newArgMax, 13, argMaxTypeConstraints),
}

func GetArgMaxVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return argMaxVersions
}
2 changes: 1 addition & 1 deletion ops/asin/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var asinVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newAsin, 7, asinTypeConstraints),
}

func GetAsinVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return asinVersions
}
2 changes: 1 addition & 1 deletion ops/asinh/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var asinhVersions = ops.OperatorVersions{
9: ops.NewOperatorConstructor(newAsinh, 9, asinhTypeConstraints),
}

func GetAsinhVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return asinhVersions
}
2 changes: 1 addition & 1 deletion ops/atan/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var atanVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newAtan, 7, atanTypeConstraints),
}

func GetAtanVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return atanVersions
}
2 changes: 1 addition & 1 deletion ops/atanh/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var atanhVersions = ops.OperatorVersions{
9: ops.NewOperatorConstructor(newAtanh, 9, atanhTypeConstraints),
}

func GetAtanhVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return atanhVersions
}
2 changes: 1 addition & 1 deletion ops/cast/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var castVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newCast, 13, castTypeConstraints),
}

func GetCastVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return castVersions
}
2 changes: 1 addition & 1 deletion ops/concat/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var concatVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newConcat, 13, concatTypeConstraints),
}

func GetConcatVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return concatVersions
}
2 changes: 1 addition & 1 deletion ops/constant/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ var constantVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newConstant, 13, [][]tensor.Dtype{}),
}

func GetConstantVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return constantVersions
}
2 changes: 1 addition & 1 deletion ops/constantofshape/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var constantOfShapeVersions = ops.OperatorVersions{
9: ops.NewOperatorConstructor(newConstantOfShape, 9, constantOfShapeTypeConstraints),
}

func GetConstantOfShapeVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return constantOfShapeVersions
}
2 changes: 1 addition & 1 deletion ops/conv/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var convVersions = ops.OperatorVersions{
11: ops.NewOperatorConstructor(newConv, 11, convTypeConstraints),
}

func GetConvVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return convVersions
}
2 changes: 1 addition & 1 deletion ops/cos/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var cosVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newCos, 7, cosTypeConstraints),
}

func GetCosVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return cosVersions
}
2 changes: 1 addition & 1 deletion ops/cosh/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var coshVersions = ops.OperatorVersions{
9: ops.NewOperatorConstructor(newCosh, 9, coshTypeConstraints),
}

func GetCoshVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return coshVersions
}
2 changes: 1 addition & 1 deletion ops/div/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var divVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newDiv, 13, divTypeConstraints),
}

func GetDivVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return divVersions
}
2 changes: 1 addition & 1 deletion ops/equal/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var equalVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newEqual, 13, equalTypeConstraints),
}

func GetEqualVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return equalVersions
}
2 changes: 1 addition & 1 deletion ops/expand/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var expandVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newExpand, 13, expandTypeConstraints),
}

func GetExpandVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return expandVersions
}
2 changes: 1 addition & 1 deletion ops/flatten/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ var flattenVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newFlatten, 13, [][]tensor.Dtype{ops.AllTypes}),
}

func GetFlattenVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return flattenVersions
}
2 changes: 1 addition & 1 deletion ops/gather/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var gatherVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newGather, 13, gatherTypeConstraints),
}

func GetGatherVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return gatherVersions
}
2 changes: 1 addition & 1 deletion ops/gemm/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ var gemmVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newGemm, 13, gemmTypeConstraints),
}

func GetGemmVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return gemmVersions
}
2 changes: 1 addition & 1 deletion ops/greater/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var greaterVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newGreater, 13, greaterTypeConstraints),
}

func GetGreaterVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return greaterVersions
}
2 changes: 1 addition & 1 deletion ops/greaterorequal/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var greaterOrEqualVersions = ops.OperatorVersions{
12: ops.NewOperatorConstructor(newGreaterOrEqual, 12, greaterOrEqualTypeConstraints),
}

func GetGreaterOrEqualVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return greaterOrEqualVersions
}
4 changes: 2 additions & 2 deletions ops/gru/gru.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (g *GRU) extractXt(X tensor.Tensor, t int) (tensor.Tensor, error) {
func (g *GRU) gateCalculation(
Xt, H, W, R, Wb, Rb tensor.Tensor, activation ops.Activation,
) (tensor.Tensor, error) {
gemm := gemm.GetGemmVersions()[13]()
gemm := gemm.GetVersions()[13]()

err := gemm.Init(
&onnx.NodeProto{
Expand Down Expand Up @@ -258,7 +258,7 @@ func (g *GRU) htCalculation(
return g.gateCalculation(Xt, temp1, W, R, Wb, Rb, activation)
}

gemm := gemm.GetGemmVersions()[13]()
gemm := gemm.GetVersions()[13]()

err := gemm.Init(
&onnx.NodeProto{
Expand Down
2 changes: 1 addition & 1 deletion ops/gru/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var gruVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newGRU, 7, gruTypeConstraints),
}

func GetGRUVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return gruVersions
}
2 changes: 1 addition & 1 deletion ops/less/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var lessVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newLess, 13, lessTypeConstraints),
}

func GetLessVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return lessVersions
}
2 changes: 1 addition & 1 deletion ops/lessorequal/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var lessOrEqualVersions = ops.OperatorVersions{
12: ops.NewOperatorConstructor(newLessOrEqual, 12, lessOrEqualTypeConstraints),
}

func GetLessOrEqualVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return lessOrEqualVersions
}
2 changes: 1 addition & 1 deletion ops/linearregressor/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var linearRegressorVersions = ops.OperatorVersions{
1: ops.NewOperatorConstructor(newLinearRegressor, 1, linearRegressorTypeConstraints),
}

func GetLinearRegressorVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return linearRegressorVersions
}
2 changes: 1 addition & 1 deletion ops/logsoftmax/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var logSoftmaxVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newLogSoftmax, 13, logSoftmaxTypeConstraints),
}

func GetLogSoftmaxVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return logSoftmaxVersions
}
2 changes: 1 addition & 1 deletion ops/lstm/lstm.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (l *LSTM) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error) {
func (l *LSTM) gateCalculation(
Xt, W, Wb, H, R, Rb, P, C tensor.Tensor, activation ops.Activation,
) (tensor.Tensor, error) {
gemm := gemm.GetGemmVersions()[13]()
gemm := gemm.GetVersions()[13]()

err := gemm.Init(
&onnx.NodeProto{
Expand Down
2 changes: 1 addition & 1 deletion ops/lstm/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var lstmVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newLSTM, 7, lstmTypeConstraints),
}

func GetLSTMVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return lstmVersions
}
2 changes: 1 addition & 1 deletion ops/matmul/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ var matMulVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newMatMul, 13, matmulTypeConstraints),
}

func GetMatMulVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return matMulVersions
}
2 changes: 1 addition & 1 deletion ops/mul/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ var mulVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newMul, 13, mulTypeConstraints),
}

func GetMulVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return mulVersions
}
2 changes: 1 addition & 1 deletion ops/not/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var notVersions = ops.OperatorVersions{
1: ops.NewOperatorConstructor(newNot, 1, notTypeConstraints),
}

func GetNotVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return notVersions
}
2 changes: 1 addition & 1 deletion ops/or/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var orVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newOr, 7, orTypeConstraints),
}

func GetOrVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return orVersions
}
2 changes: 1 addition & 1 deletion ops/prelu/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var preluVersions = ops.OperatorVersions{
9: ops.NewOperatorConstructor(newPRelu, 9, preluTypeConstraints),
}

func GetPReluVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return preluVersions
}
2 changes: 1 addition & 1 deletion ops/reducemax/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var reduceMaxVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newReduceMax, 13, reduceMaxTypeConstraints),
}

func GetReduceMaxVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return reduceMaxVersions
}
2 changes: 1 addition & 1 deletion ops/reducemin/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ var reduceMinVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newReduceMin, 13, reduceMinTypeConstraints),
}

func GetReduceMinVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return reduceMinVersions
}
2 changes: 1 addition & 1 deletion ops/relu/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ var reluVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newRelu, 13, reluTypeConstraints),
}

func GetReluVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return reluVersions
}
2 changes: 1 addition & 1 deletion ops/reshape/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ var reshapeVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newReshape, 13, reshapeTypeConstraints),
}

func GetReshapeVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return reshapeVersions
}
2 changes: 1 addition & 1 deletion ops/rnn/rnn.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (r *RNN) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error) {
func (r *RNN) layerCalculation(
Xt, H, Wi, Ri, Wbi, Rbi tensor.Tensor, activation ops.Activation,
) (tensor.Tensor, error) {
gemm := gemm.GetGemmVersions()[13]()
gemm := gemm.GetVersions()[13]()

err := gemm.Init(
&onnx.NodeProto{
Expand Down
2 changes: 1 addition & 1 deletion ops/rnn/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var rnnVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newRNN, 7, rnnTypeConstraints),
}

func GetRNNVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return rnnVersions
}
2 changes: 1 addition & 1 deletion ops/scaler/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var scalerVersions = ops.OperatorVersions{
1: ops.NewOperatorConstructor(newScaler, 1, scalerTypeConstraints),
}

func GetScalerVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return scalerVersions
}
2 changes: 1 addition & 1 deletion ops/shape/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ var shapeVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newShape, 13, shapeTypeConstraints),
}

func GetShapeVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return shapeVersions
}
2 changes: 1 addition & 1 deletion ops/sigmoid/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ var sigmoidVersions = ops.OperatorVersions{
13: ops.NewOperatorConstructor(newSigmoid, 13, sigmoidTypeConstraints),
}

func GetSigmoidVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return sigmoidVersions
}
2 changes: 1 addition & 1 deletion ops/sin/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var sinVersions = ops.OperatorVersions{
7: ops.NewOperatorConstructor(newSin, 7, sinTypeConstraints),
}

func GetSinVersions() ops.OperatorVersions {
func GetVersions() ops.OperatorVersions {
return sinVersions
}
Loading

0 comments on commit 5c05450

Please sign in to comment.