Skip to content

Commit

Permalink
Adding EnableClassComparison()
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopauloschuler committed Nov 28, 2019
1 parent 9d404f7 commit 1ef4b10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions neural/neuralfit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ TNeuralDataLoadingFit = class(TNeuralFitBase)
Item: TMultiThreadProcItem);
procedure EnableMonopolarHitComparison();
procedure EnableBipolarHitComparison();
procedure EnableClassComparison();

property DataAugmentationFn: TNNetDataAugmentationFn read FDataAugmentationFn write FDataAugmentationFn;
property InferHitFn: TNNetInferHitFn read FInferHitFn write FInferHitFn;
Expand Down Expand Up @@ -207,6 +208,7 @@ TNeuralImageFit = class(TNeuralFitBase)

function MonopolarCompare(A, B: TNNetVolume): boolean;
function BipolarCompare(A, B: TNNetVolume): boolean;
function ClassCompare(A, B: TNNetVolume): boolean;

implementation
uses
Expand Down Expand Up @@ -250,6 +252,10 @@ function BipolarCompare(A, B: TNNetVolume): boolean;
end;
end;

function ClassCompare(A, B: TNNetVolume): boolean;
begin
Result := (A.GetClass() = B.GetClass());
end;
{ TNeuralDataLoadingFit }

constructor TNeuralDataLoadingFit.Create();
Expand Down Expand Up @@ -884,6 +890,11 @@ procedure TNeuralDataLoadingFit.EnableBipolarHitComparison();
FInferHitFn := @BipolarCompare;
end;

procedure TNeuralDataLoadingFit.EnableClassComparison();
begin
FInferHitFn := @ClassCompare;
end;

{ TNeuralFitBase }

constructor TNeuralFitBase.Create();
Expand Down

0 comments on commit 1ef4b10

Please sign in to comment.