@@ -30,7 +30,10 @@ object TensorFlow {
3030 private [this ] val logger : Logger = Logger (LoggerFactory .getLogger(" TensorFlow Native" ))
3131
3232 /** TensorFlow native library name. */
33- private [this ] val LIB_NAME : String = " tensorflow_framework"
33+ private [this ] val LIB_NAME : String = " tensorflow"
34+
35+ /** TensorFlow native framework library name. */
36+ private [this ] val LIB_FRAMEWORK_NAME : String = " tensorflow_framework"
3437
3538 /** TensorFlow JNI bindings library name. */
3639 private [this ] val JNI_LIB_NAME : String = " tensorflow_jni"
@@ -73,7 +76,9 @@ object TensorFlow {
7376 })
7477 val classLoader = Thread .currentThread.getContextClassLoader
7578
76- // Check if a TensorFlow native library resource is provided and load it.
79+ // Check if a TensorFlow native framework library resource is provided and load it.
80+ Option (classLoader.getResourceAsStream(makeResourceName(LIB_FRAMEWORK_NAME )))
81+ .map(extractResource(LIB_FRAMEWORK_NAME , _, tempDirectory))
7782 Option (classLoader.getResourceAsStream(makeResourceName(LIB_NAME )))
7883 .map(extractResource(LIB_NAME , _, tempDirectory))
7984
@@ -125,7 +130,7 @@ object TensorFlow {
125130
126131 /** Generates the resource name (including the path) for the specified library. */
127132 private def makeResourceName (lib : String ): String = {
128- if (lib == LIB_NAME )
133+ if (lib == LIB_NAME || lib == LIB_FRAMEWORK_NAME )
129134 mapLibraryName(lib)
130135 else
131136 s " native/ $os- $architecture/ ${mapLibraryName(lib)}"
0 commit comments