public final class TensorFlowUtil extends Object
Modifier and Type | Method and Description |
---|---|
static File |
getCrashFile(String root) |
static String |
getLibDir(String root) |
static File |
getNativeVersionFile(String root) |
static URL |
getTensorFlowJAR() |
static TensorFlowVersion |
getTensorFlowJARVersion(URL jar) |
static String |
getUpdateLibDir(String root) |
static TensorFlowVersion |
readNativeVersionFile(String root)
Reading the content of the
TFVERSIONFILE indicating which native version of TensorFlow is installed |
static void |
removeNativeLibraries(String root,
Logger logger)
Deletes all TensorFlow native library files in
getLibDir(String) . |
static TensorFlowVersion |
versionFromClassPathJAR() |
static void |
writeNativeVersionFile(String root,
String platform,
TensorFlowVersion version)
Writing the content of the
TFVERSIONFILE indicating which native version of TensorFlow is installed |
public static TensorFlowVersion getTensorFlowJARVersion(URL jar)
jar
- the JAR file of the TensorFlow librarypublic static TensorFlowVersion versionFromClassPathJAR()
public static URL getTensorFlowJAR()
public static void removeNativeLibraries(String root, Logger logger)
getLibDir(String)
.root
- the root path of ImageJlogger
- public static TensorFlowVersion readNativeVersionFile(String root) throws IOException
TFVERSIONFILE
indicating which native version of TensorFlow is installedroot
- the root path of ImageJIOException
- in case the util file containing the native version number cannot be read (must not mean there is no usable native version)public static void writeNativeVersionFile(String root, String platform, TensorFlowVersion version)
TFVERSIONFILE
indicating which native version of TensorFlow is installedroot
- the root path of ImageJplatform
- the platform of the user (e.g. linux64, win64, macosx)version
- the installed TensorFlow versionpublic static File getCrashFile(String root)
root
- the root path of ImageJpublic static File getNativeVersionFile(String root)
root
- the root path of ImageJpublic static String getLibDir(String root)
root
- the root path of ImageJpublic static String getUpdateLibDir(String root)
root
- the root path of ImageJgetLibDir(String)
Copyright © 2014–2022 ImageJ. All rights reserved.