Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

Neuron Object Demo For Delphi XE5 Firemonkey On Android and IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey Neural Network Neuron | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSWhile looking for Delphi Firemonkey projects I found a Delphi Science blog which has a post up about neural networks. It includes a demo for Delphi XE5 Firemonkey that contains a TNeuron object. If you’re looking for some code to get you started with artificial intelligence and neural networks in Delphi this might be a good starting spot. The blog post goes into detail on what a neuron is and the math behind a neuron. The demo should run on Android and IOS and there isn’t any platform specific code. Here is a code snippet that defines the TNeuron object:
TNeuron = class(TObject)
private
FThreshold: Single;
FInputCount: Integer;
FInputs:TSingleDynArray;
FWeights:TSingleDynArray;
FAnalogOutput:Boolean;
function GetInput(Index: Integer): Single;
function GetOutput: Single;
function GetWeight(Index: Integer): Single;
procedure SetInput(Index: Integer; const Value: Single);
procedure SetWeight(Index: Integer; const Value: Single);
procedure SetInputCount(const Value: Integer);
function GetLoad: Single;
public
Constructor Create(aInputCount:Integer);
procedure RandomInitialize;
Property Load:Single read GetLoad;
property Output:Single read GetOutput;
property Threshold:Single read FThreshold write FThreshold;
property Inputs[Index: Integer]: Single read GetInput write SetInput;
property Weights[Index: Integer]: Single read GetWeight write SetWeight;
property InputCount:Integer read FInputCount write SetInputCount;
property AnalogOutput read FAnalogOutput write FAnalogOutput;
end;

Download the updated TNeuron project for Delphi XE5 Firemonkey.

Head over and read the full blog post about the Delphi XE5 neuron object.

 

Exit mobile version