public abstract class AbstractPredictor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isClosed
Has the TensorFlow session been closed?
|
protected org.tensorflow.Session |
tfSession
A copy of the current TensorFlow session.
|
| Constructor and Description |
|---|
AbstractPredictor() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes resources associated with this predictor.
|
protected void |
finalize()
Failsafe in case the TensorFlow session has not been closed.
|
protected static org.tensorflow.Tensor<Float> |
imageToTensor(ImagePlus imp)
Converts an ImageJ image to a TensorFlow tensor.
|
void |
setup(String pathToModel)
Initializes the predictor.
|
protected org.tensorflow.Session tfSession
protected boolean isClosed
public void close()
public void setup(String pathToModel)
pathToModel - The path to a saved TensorFlow model bundle.protected static org.tensorflow.Tensor<Float> imageToTensor(ImagePlus imp)
imp - The image to convert.Copyright © 2018 The Laboratory of Experimental Biophysics. All rights reserved.