Remove nd4j dependency from benchmarks

This commit is contained in:
Alexander Nozik 2025-01-27 14:46:27 +03:00
parent 2a3cf190b1
commit 4277f480d8
2 changed files with 4 additions and 4 deletions
benchmarks
kmath-tensorflow/src/main/kotlin/space/kscience/kmath/tensorflow

@ -10,7 +10,7 @@ plugins {
} }
allOpen.annotation("org.openjdk.jmh.annotations.State") allOpen.annotation("org.openjdk.jmh.annotations.State")
sourceSets.register("benchmarks") //sourceSets.register("benchmarks")
repositories { repositories {
mavenCentral() mavenCentral()
@ -66,8 +66,8 @@ kotlin {
implementation(projects.kmathOjalgo) implementation(projects.kmathOjalgo)
implementation(projects.kmath.kmathTensorflow) implementation(projects.kmath.kmathTensorflow)
implementation(projects.kmathMultik) implementation(projects.kmathMultik)
implementation("org.tensorflow:tensorflow-core-platform:0.4.0") implementation(libs.tensorflow.core.platform)
implementation("org.nd4j:nd4j-native:1.0.0-M1") // implementation(libs.nd4j.native.platform)
// uncomment if your system supports AVX2 // uncomment if your system supports AVX2
// val os = System.getProperty("os.name") // val os = System.getProperty("os.name")
// //

@ -73,7 +73,7 @@ public abstract class TensorFlowOutput<T, TT : TType>(
internal val actualTensor by lazy { internal val actualTensor by lazy {
Session(graph).use { session -> Session(graph).use { session ->
TensorFlowArray(session.runner().fetch(output).run().first().actualizeTensor()) TensorFlowArray(session.runner().fetch(output).run().single().value.actualizeTensor())
} }
} }