📄 mlpdebugger.java
字号:
/* * $RCSfile: MLPDebugger.java,v $ * $Revision: 1.1 $ * $Date: 2005/05/03 02:54:20 $ * * NeuralNetworkToolkit * Copyright (C) 2004 Universidade de Bras锟絣ia * * This file is part of NeuralNetworkToolkit. * * NeuralNetworkToolkit is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * NeuralNetworkToolkit is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NeuralNetworkToolkit; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 - USA. */package neuralnetworktoolkit.debugger.mlp;import java.io.File;import java.io.FileNotFoundException;import java.io.PrintStream;import neuralnetworktoolkit.debugger.Debugger;import neuralnetworktoolkit.neuralnetwork.INeuralNetwork;import neuralnetworktoolkit.neuralnetwork.NeuralNetwork;/** * @author <a href="mailto:hugoiver@yahoo.com.br">Hugo Iver V. Gon锟絘lves</a> * @author <a href="mailto:rodbra@pop.com.br">Rodrigo C. M. Coimbra</a> */public class MLPDebugger extends Debugger { public MLPDebugger() { super(); } public MLPDebugger(INeuralNetwork neuralNetwork) { super(neuralNetwork); /*try { System.setOut(new PrintStream(new File("debiden.txt"))); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }*/ } /* (non-Javadoc) * @see neuralnetworktoolkit.debugger.Debugger#printNetworkState() */ public void printNetworkState() { System.out.println("Rede Neural MLP -------------------------------\n"); System.out.print("Entrada :"); for (int i = 0; i < this.neuralNetwork.getInputSize(); i++) { System.out.print(">" + this.neuralNetwork.getStaticInputValues()[i]); } System.out.println(); for (int i = 0; i < this.neuralNetwork.getNetworkSize(); i++) { System.out.print("Camada "+i+":\n"); System.out.print(" Pesos :"); for (int j = 0; j < this.neuralNetwork.getLayer(i).getLayerSize(); j++) { System.out.print("["); for (int k = 0; k < this.neuralNetwork.getLayer(i).getWeightSize(j); k++) { System.out.print(" " + this.neuralNetwork.getLayer(i).getWeight(k, j)); } System.out.print(" bias: " + this.neuralNetwork.getLayer(i).getBias(j)); System.out.print(" ]"); } System.out.println(); System.out.print(" Sa韉as :"); for (int j = 0; j < this.neuralNetwork.getLayer(i).getLayerSize(); j++) { System.out.print(" [ " + this.neuralNetwork.getLayer(i).getNeuron(j).getOutputValue() + " delta: " + this.neuralNetwork.getLayer(i).getNeuron(j).getDelta() + " ]"); } System.out.println("\n"); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -