Component: Neuron (Calculation)
Appearance
| Author | Matrix TSL |
| Version | 1.3 |
| Category | Calculation |
Neuron component
Performs a single-neuron calculation of Z = W · X + B. Sums weight * input for each input, adds bias, then optionally applies an activation function (Linear, ReLU, Sigmoid, Tanh or Leaky ReLU). Use SetWeights / SetWeight and SetBias to configure, set inputs with SetInput or pass an array to Calculate / CalculateSingle. Use CalculateLoss or CalculateLossFromResult to measure error against a target value.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Calculate
CalculateLoss
CalculateSingle
CalculateStored
| CalculateStored | |
| Same as Calculate, but uses the inputs previously stored with SetInput. Useful when filling inputs one at a time. | |
| Return | |
Initialise
| Initialise | |
| Clears all weights, inputs, bias, result and loss to 0.0. | |
| Return | |
SetBias
| SetBias | |
| Sets the bias offset constant B used in Z = W · X + B. | |
| Value | |
| Bias value | |
| Return | |
SetInput
| SetInput | |
| Stores a single input value for later use by CalculateStored. Index range: 0 to (Number of Inputs - 1). | |
| Index | |
| Input index (0 based) | |
| Value | |
| Input value to store | |
| Return | |
SetWeight
| SetWeight | |
| Sets a single weight value by index. Index range: 0 to (Number of Inputs - 1). | |
| Index | |
| Weight index (0 based) | |
| Value | |
| Weight value to store | |
| Return | |
SetWeights
| SetWeights | |
| Copies an array of weight values into the neuron. The array must contain at least Number of Inputs elements. | |
| WeightArray | |
| Array of weight values (one per input) | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Neuron.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Neuron.fcfx