@@ -30,7 +30,10 @@ object TensorFlow {
30
30
private [this ] val logger : Logger = Logger (LoggerFactory .getLogger(" TensorFlow Native" ))
31
31
32
32
/** 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"
34
37
35
38
/** TensorFlow JNI bindings library name. */
36
39
private [this ] val JNI_LIB_NAME : String = " tensorflow_jni"
@@ -73,7 +76,9 @@ object TensorFlow {
73
76
})
74
77
val classLoader = Thread .currentThread.getContextClassLoader
75
78
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))
77
82
Option (classLoader.getResourceAsStream(makeResourceName(LIB_NAME )))
78
83
.map(extractResource(LIB_NAME , _, tempDirectory))
79
84
@@ -125,7 +130,7 @@ object TensorFlow {
125
130
126
131
/** Generates the resource name (including the path) for the specified library. */
127
132
private def makeResourceName (lib : String ): String = {
128
- if (lib == LIB_NAME )
133
+ if (lib == LIB_NAME || lib == LIB_FRAMEWORK_NAME )
129
134
mapLibraryName(lib)
130
135
else
131
136
s " native/ $os- $architecture/ ${mapLibraryName(lib)}"
0 commit comments