public class NeuralNetPlotter extends Object implements Serializable
Constructor and Description |
---|
NeuralNetPlotter() |
Modifier and Type | Method and Description |
---|---|
String |
getLayerGraphFilePath() |
void |
graphPlotType(String plotType,
List<String> titles,
org.nd4j.linalg.api.ndarray.INDArray[] matrices,
String saveFilePath)
graphPlotType sets up data to pass to scripts that render graphs
|
void |
plotActivations(Layer layer)
plotActivations show how hidden neurons are used, how often on vs.
|
void |
plotNetworkGradient(Layer layer,
Gradient gradient)
plotNetworkGradient used for debugging RBM gradients with different data visualizations
|
void |
plotNetworkGradient(Layer layer,
org.nd4j.linalg.api.ndarray.INDArray gradient) |
void |
plotWeightHistograms(Layer network) |
void |
plotWeightHistograms(Layer network,
Gradient gradient)
plotWeightHistograms graphs values of vBias, W, and hBias on aggregate and
most recent mini-batch updates (-gradient)
|
static void |
printDataFilePath() |
static void |
printGraphFilePath() |
void |
renderFilter(Layer layer,
int patchesPerRow)
renderFilter plot learned filter for each hidden neuron
|
void |
renderGraph(String action,
String dataPath,
String saveFilePath)
Calls out to python for rendering charts
|
void |
renderGraph(String action,
String dataPath,
String saveFilePath,
int feature_width,
int feature_height)
Calls out to python for rendering charts
|
void |
setLayerGraphFilePath(String newPath) |
protected static void |
setupDirectory(String path) |
void |
updateGraphDirectory(Layer layer) |
String |
writeArray(ArrayList data) |
protected String |
writeMatrix(org.nd4j.linalg.api.ndarray.INDArray matrix) |
public String getLayerGraphFilePath()
public void setLayerGraphFilePath(String newPath)
public static void printDataFilePath()
public static void printGraphFilePath()
protected static void setupDirectory(String path)
public void updateGraphDirectory(Layer layer)
protected String writeMatrix(org.nd4j.linalg.api.ndarray.INDArray matrix)
public void renderGraph(String action, String dataPath, String saveFilePath)
action
- the action to takedataPath
- the path to the datasaveFilePath
- the saved file path for output of graphspublic void renderGraph(String action, String dataPath, String saveFilePath, int feature_width, int feature_height)
action
- the action to takedataPath
- the path to the datasaveFilePath
- the saved file path for output of graphsfeature_width
- width of featurefeature_height
- height of featurepublic void graphPlotType(String plotType, List<String> titles, org.nd4j.linalg.api.ndarray.INDArray[] matrices, String saveFilePath)
plotType
- sets which plot to call whether "multi" for multiple matrices histograms,
"hist" for a histogram of one matrix, or "scatter" for scatter plottitles
- the titles of the plotsmatrices
- the matrices to plotpublic void plotWeightHistograms(Layer network, Gradient gradient)
network
- the trained neural net modelgradient
- latest updates to weights and biasespublic void plotWeightHistograms(Layer network)
public void plotActivations(Layer layer)
layer
- the trained neural net layerpublic void renderFilter(Layer layer, int patchesPerRow)
layer
- the trained neural net layer in the modelpublic void plotNetworkGradient(Layer layer, Gradient gradient)
layer
- the neural net layergradient
- latest updates to weights and biasespublic void plotNetworkGradient(Layer layer, org.nd4j.linalg.api.ndarray.INDArray gradient)
Copyright © 2015. All Rights Reserved.