Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetComponentDelphiDemoFiremonkeyIOSOSXWindows

Neuron Object Demo For Delphi XE5 Firemonkey On Android and IOS

Delphi XE5 Firemonkey Neural Network NeuronWhile 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.

 

close

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

DelphiIDEShowcaseWindows

Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed

1 Comment

Leave a Reply to Joseph Mitzen Cancel reply