public class Dl4jMlpFilter
extends weka.filters.SimpleBatchFilter
implements weka.core.OptionHandler, weka.core.CapabilitiesHandler
Dl4jMlpClassifier as feature
transformation.| Constructor and Description |
|---|
Dl4jMlpFilter()
FILTER CODE.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTransformationLayerName(java.lang.String transformationLayerName)
Adds a new transformation layer for the filter to use.
|
boolean |
allowAccessToFullInputFormat() |
void |
clearTransformationLayers()
Clear the transformation layers to be used by the filter.
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
AbstractInstanceIterator |
getInstanceIterator() |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
PoolingType |
getPoolingType() |
java.io.File |
getSerializedModelFile()
GET/SET METHODS
|
DenseLayer |
getTransformationLayer(int index) |
DenseLayer[] |
getTransformationLayers() |
boolean |
getUseDefaultFeatureLayer() |
AbstractZooModel |
getZooModelType() |
java.lang.String |
globalInfo() |
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
void |
setInstanceIterator(AbstractInstanceIterator instanceIterator) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPoolingType(PoolingType poolingType) |
void |
setSerializedModelFile(java.io.File modelPath) |
void |
setTransformationLayerNames(java.lang.String[] transformationLayerNames) |
void |
setTransformationLayers(DenseLayer[] transformationLayers) |
void |
setUseDefaultFeatureLayer(boolean useDefaultFeatureLayer) |
void |
setZooModelType(AbstractZooModel zooModelType)
Clear the old transformation layers and set the new one if we've changed to a different model type.
|
java.lang.String[] |
transformationLayersToNames()
Return transformation layer names.
|
batchFilterFile, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getOutputFormat, getRevision, isFirstBatchDone, isNewBatch, isOutputFormatDefined, main, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapper@OptionMetadata(description="The trained Dl4jMlpClassifier object that contains the network, used for transformation.",
displayName="Serialized model file",
commandLineParamName="model",
commandLineParamSynopsis="-model <File>",
displayOrder=1)
public java.io.File getSerializedModelFile()
public void setSerializedModelFile(java.io.File modelPath)
@OptionMetadata(description="The pretrained model from the DL4J Model Zoo (or a keras model)",
displayName="Pretrained zoo model",
commandLineParamName="zooModel",
commandLineParamSynopsis="-zooModel <Model Zoo specification>",
displayOrder=2)
public AbstractZooModel getZooModelType()
public void setZooModelType(AbstractZooModel zooModelType)
zooModelType - Type we're changing to@OptionMetadata(description="The instance iterator to use.",
displayName="instance iterator",
commandLineParamName="iterator",
commandLineParamSynopsis="-iterator <string>")
public AbstractInstanceIterator getInstanceIterator()
public void setInstanceIterator(AbstractInstanceIterator instanceIterator)
@OptionMetadata(description="Pooling function to apply on intermediary activations",
displayName="Pooling Type",
commandLineParamName="poolingType",
commandLineParamSynopsis="-poolingType <String>")
public PoolingType getPoolingType()
public void setPoolingType(PoolingType poolingType)
@OptionMetadata(description="Layers used for the feature transformation (can be left blank, default will be applied)",
displayName="Feature extraction layers",
commandLineParamName="layer-extract",
commandLineParamSynopsis="-layer-extract <Dense Layer Spec>",
displayOrder=0)
public DenseLayer[] getTransformationLayers()
public DenseLayer getTransformationLayer(int index)
public void setTransformationLayers(DenseLayer[] transformationLayers)
public void setTransformationLayerNames(java.lang.String[] transformationLayerNames)
public void addTransformationLayerName(java.lang.String transformationLayerName)
transformationLayerName - name of the layer in the model to take activations frompublic void clearTransformationLayers()
public boolean getUseDefaultFeatureLayer()
@OptionMetadata(displayName="Use default feature layer",
description="Set to true to load the default feature extraction layer in the GUI - false to set your own custom layers.",
displayOrder=0,
commandLineParamName="default-feature-layer",
commandLineParamSynopsis="-default-feature-layer",
commandLineParamIsFlag=true)
public void setUseDefaultFeatureLayer(boolean useDefaultFeatureLayer)
public boolean allowAccessToFullInputFormat()
allowAccessToFullInputFormat in class weka.filters.SimpleBatchFilterpublic java.lang.String[] transformationLayersToNames()
public java.lang.String globalInfo()
globalInfo in class weka.filters.SimpleFilterpublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.filters.Filterpublic java.util.Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.filters.Filterpublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.filters.Filterpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface weka.core.OptionHandlersetOptions in class weka.filters.Filteroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supported