📄 trainingelement.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 + -