Skip to content

Commit

Permalink
fix: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 9, 2023
1 parent 401f55c commit 373e98f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ class STSemantic(
// floatArray is an inputIds.size * 384 array, we need to mean it to 384 * 1
// 1, shape, shape.length
val shapeSize = outputTensor.info.shape[2].toInt()
val meanArray = FloatArray(shapeSzie)
for (i in 0 until shapeSzie) {
val meanArray = FloatArray(shapeSize)
for (i in 0 until shapeSize) {
var sum = 0f
for (j in inputIds.indices) {
sum += floatArray[j * shapeSzie + i]
sum += floatArray[j * shapeSize + i]
}

meanArray[i] = sum / inputIds.size
Expand Down

0 comments on commit 373e98f

Please sign in to comment.