public class DeepwaterCaffeBackend
extends java.lang.Object
implements deepwater.backends.BackendTrain
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAFFE_DIR |
static java.lang.String |
CAFFE_H2O_DIR |
Constructor and Description |
---|
DeepwaterCaffeBackend() |
Modifier and Type | Method and Description |
---|---|
deepwater.backends.BackendModel |
buildNet(deepwater.datasets.ImageDataSet dataset,
deepwater.backends.RuntimeOptions opts,
deepwater.backends.BackendParams bparms,
int num_classes,
java.lang.String name) |
void |
delete(deepwater.backends.BackendModel m) |
void |
deleteSavedModel(java.lang.String model_path) |
void |
deleteSavedParam(java.lang.String param_path) |
float[] |
extractLayer(deepwater.backends.BackendModel m,
java.lang.String name,
float[] data) |
java.lang.String |
listAllLayers(deepwater.backends.BackendModel m) |
float[] |
loadMeanImage(deepwater.backends.BackendModel m,
java.lang.String path) |
void |
loadParam(deepwater.backends.BackendModel m,
java.lang.String param_path) |
float[] |
predict(deepwater.backends.BackendModel m,
float[] data) |
byte[] |
readBytes(java.io.File file) |
void |
saveModel(deepwater.backends.BackendModel m,
java.lang.String model_path) |
void |
saveParam(deepwater.backends.BackendModel m,
java.lang.String param_path) |
void |
setParameter(deepwater.backends.BackendModel m,
java.lang.String name,
float value) |
java.lang.String |
toJson(deepwater.backends.BackendModel m) |
float[] |
train(deepwater.backends.BackendModel m,
float[] data,
float[] label) |
void |
writeBytes(java.io.File file,
byte[] payload) |
public static final java.lang.String CAFFE_DIR
public static final java.lang.String CAFFE_H2O_DIR
public void delete(deepwater.backends.BackendModel m)
delete
in interface deepwater.backends.BackendTrain
public deepwater.backends.BackendModel buildNet(deepwater.datasets.ImageDataSet dataset, deepwater.backends.RuntimeOptions opts, deepwater.backends.BackendParams bparms, int num_classes, java.lang.String name)
buildNet
in interface deepwater.backends.BackendTrain
public void saveModel(deepwater.backends.BackendModel m, java.lang.String model_path)
saveModel
in interface deepwater.backends.BackendTrain
public void loadParam(deepwater.backends.BackendModel m, java.lang.String param_path)
loadParam
in interface deepwater.backends.BackendTrain
public void saveParam(deepwater.backends.BackendModel m, java.lang.String param_path)
saveParam
in interface deepwater.backends.BackendTrain
public float[] loadMeanImage(deepwater.backends.BackendModel m, java.lang.String path)
loadMeanImage
in interface deepwater.backends.BackendTrain
public java.lang.String toJson(deepwater.backends.BackendModel m)
toJson
in interface deepwater.backends.BackendTrain
public void setParameter(deepwater.backends.BackendModel m, java.lang.String name, float value)
setParameter
in interface deepwater.backends.BackendTrain
public float[] train(deepwater.backends.BackendModel m, float[] data, float[] label)
train
in interface deepwater.backends.BackendTrain
public float[] predict(deepwater.backends.BackendModel m, float[] data)
predict
in interface deepwater.backends.BackendTrain
public void deleteSavedModel(java.lang.String model_path)
deleteSavedModel
in interface deepwater.backends.BackendTrain
public void deleteSavedParam(java.lang.String param_path)
deleteSavedParam
in interface deepwater.backends.BackendTrain
public java.lang.String listAllLayers(deepwater.backends.BackendModel m)
listAllLayers
in interface deepwater.backends.BackendTrain
public float[] extractLayer(deepwater.backends.BackendModel m, java.lang.String name, float[] data)
extractLayer
in interface deepwater.backends.BackendTrain
public void writeBytes(java.io.File file, byte[] payload) throws java.io.IOException
writeBytes
in interface deepwater.backends.BackendTrain
java.io.IOException
public byte[] readBytes(java.io.File file) throws java.io.IOException
readBytes
in interface deepwater.backends.BackendTrain
java.io.IOException