@@ -16,12 +16,12 @@ limitations under the License.
1616*/
1717package org.tensorflow
1818
19+ import kotlin.test.Test
20+ import kotlin.test.assertEquals
1921import org.tensorflow.ndarray.Shape
2022import org.tensorflow.op.WithOps
2123import org.tensorflow.op.kotlin.tf
2224import org.tensorflow.types.TFloat32
23- import kotlin.test.Test
24- import kotlin.test.assertEquals
2525
2626private fun WithOps.DenseLayer (
2727 name : String ,
@@ -30,7 +30,7 @@ private fun WithOps.DenseLayer(
3030 activation : WithOps .(Operand <TFloat32 >) -> Operand <TFloat32 > = { tf.nn.relu(it) },
3131): Operand <TFloat32 > =
3232 tf.withSubScope(name) {
33- // TODO should be dynamic
33+ // TODO should be dynamic
3434 val inputDims = x.shape()[1 ]
3535 val W = tf.variable(tf.ones<TFloat32 >(tf.array(inputDims.toInt(), n)))
3636 val b = tf.variable(tf.ones<TFloat32 >(tf.array(n)))
@@ -53,7 +53,7 @@ public class ExampleTest {
5353 useSession { session ->
5454 session.runInit()
5555 val outputValue = session.runner().fetch(output).run ()[0 ] as TFloat32
56- assertEquals(Shape .of(1 , 10 ), outputValue.shape())
56+ assertEquals(Shape .of(1 , 10 ), outputValue.shape())
5757 assertEquals(1.0f , outputValue.getFloat(0 , 0 ))
5858 }
5959 }
0 commit comments