⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trainingelement.java

📁 神经网络源代码,实现了一个BP神经网络,可以完成基于BP的神经网络算法.
💻 JAVA
字号:
package net.openai.ai.nn.training;import java.util.*;public class TrainingElement {    //  holds the input for this training element    private Vector input = null;        //  holds the desired output for this element    private Vector desired = null;    //  holds the current output that was calcuated for this element    private Vector output = null;    public TrainingElement() {	input = new Vector();	output = new Vector();    }    public TrainingElement(Vector input, Vector desired) {	this();	this.input = input;	this.desired = desired;;    }    /**     * Returns the input values for this element     * @return Vector input values.     */    public Vector getInput() {	return input;    }    /**     * Sets the input values for this element     * @param Vector input values.     */    public void setInput(Vector input) {	this.input = input;    }    /**     * Returns the desired values for this element     * @return Vector desired values.     */    public Vector getDesired() {	return desired;    }    /**     * Sets the desired values for this element     * @param Vector desired values.     */    public void setDesired(Vector desired) {	this.desired = desired;    }    /**     * Returns the current output values for this element     * @return Vector input values.     */    public Vector getOutput() {	return output;    }    /**     * Sets the output values for this element     * @param Vector output values.     */    public void setOutput(Vector output) {	this.output = output;    }    /**     * Returns a string representation of the training element.     *     * @return String String representation.     */    public String toString() {	String element = "\nInput:\n" + input.toString() + "\n";	element += "Desired:\n" + desired.toString() + "\n"; 	element += "Output:\n" + output.toString() + "\n"; 	return element;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -