We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aad7147 commit 5a53b6dCopy full SHA for 5a53b6d
tools/test/src/tools/Reshape.scala
@@ -43,15 +43,20 @@ object Reshape {
43
val output =
44
new DataInputStream(new ByteArrayInputStream(bytes))
45
46
+ val outputSize = arraySize * 4
47
+
48
val result = Util
- .readResult(dataType, output, arraySize, arraySize * 4)
- .grouped(arraySize)
49
- .map(_.take(2))
+ .readResult(dataType, output, arraySize, outputSize)
50
+ .toArray
51
52
+ val golden = Golden
53
+ .grouped(2)
54
+ .map(_ ++ Array.fill(arraySize - 2)(0f))
55
.flatten
56
.toArray
57
- for (i <- 0 until 8)
- rmse.addSample(result(i), Golden(i))
58
+ for (i <- 0 until outputSize)
59
+ rmse.addSample(result(i), golden(i))
60
61
assert(rmse.compute < dataType.error)
62
}
0 commit comments