public class TensorFlowImportValidator extends Object
| Constructor and Description |
|---|
TensorFlowImportValidator() |
| Modifier and Type | Method and Description |
|---|---|
static TFImportStatus |
checkAllModelsForImport(@NonNull File directory)
Recursively scan the specified directory for .pb files, and evaluate which operations/graphs can/can't be imported
|
static TFImportStatus |
checkAllModelsForImport(@NonNull File directory,
boolean includeArchives) |
static TFImportStatus |
checkAllModelsForImport(File directory,
String[] fileExtensions) |
static TFImportStatus |
checkModelForImport(@NonNull File file)
|
static TFImportStatus |
checkModelForImport(@NonNull File file,
boolean exceptionOnRead)
Check whether the TensorFlow frozen model (protobuf format) can be imported into SameDiff or not
|
static TFImportStatus |
checkModelForImport(String path,
InputStream is,
boolean exceptionOnRead) |
static boolean |
isArchiveFile(File f) |
public static TFImportStatus checkAllModelsForImport(@NonNull @NonNull File directory) throws IOException
directory - Directory to scanIOExceptionpublic static TFImportStatus checkAllModelsForImport(@NonNull @NonNull File directory, boolean includeArchives) throws IOException
IOExceptionpublic static TFImportStatus checkAllModelsForImport(File directory, String[] fileExtensions) throws IOException
IOExceptionpublic static boolean isArchiveFile(File f)
public static TFImportStatus checkModelForImport(@NonNull @NonNull File file) throws IOException
checkModelForImport(File). Defaults to exceptionOnRead = falseIOExceptionpublic static TFImportStatus checkModelForImport(@NonNull @NonNull File file, boolean exceptionOnRead) throws IOException
file - Protobuf fileexceptionOnRead - If true, and the file can't be read, throw an exception. If false, return an "empty" TFImportStatusIOException - If errorpublic static TFImportStatus checkModelForImport(String path, InputStream is, boolean exceptionOnRead) throws IOException
IOExceptionCopyright © 2021. All rights reserved.