[WIP] Fix TNeuralFit accuracy metrics reporting issue #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SumAbsoluteErrorBelowfunction inneuralfit.pasthat considers a "hit" when the sum of absolute output errors is smaller than 0.001InferHitFnTestNeuralFit.pasOriginal prompt
This section details on the original issue you should resolve
<issue_title>TNeuralFit completes training successfully but reports
TrainingAccuracy,ValidationAccuracy, andTestAccuracyas 0.00% even when the network demonstrably learns</issue_title><issue_description># TNeuralFit Accuracy Metrics Report Zero Percent on Training/Validation/Test Sets
Description
TNeuralFit completes training successfully but reports
TrainingAccuracy,ValidationAccuracy, andTestAccuracyas 0.00% even when the network demonstrably learns (outputs vary appropriately, loss decreases, predictions are non-trivial).This makes TNeuralFit's accuracy metrics unreliable for monitoring training progress and model evaluation.
Steps to Reproduce
Test Case: Hypotenuse Function (Regression)
Based on the official
examples/Hypotenuseexample pattern:Expected Behavior
After 50 epochs of training on the hypotenuse function:
TrainingAccuracyshould be >50% (network learned mapping)ValidationAccuracyshould be >40% (reasonable generalization)TestAccuracyshould be >40% (unseen data performance)Actual Behavior
Analysis
Possible Root Causes
InferHitFndefault implementation incompatible with regression targetsWorkaround
Use manual training loops with
NN.Compute()+NN.Backpropagate()for reliable accuracy metrics:Environment
Impact
This prevents reliable use of TNeuralFit for model evaluation and progress monitoring, forcing users back to manual training loops even when batching would be beneficial.
</issue_description>
<a...
TrainingAccuracy,ValidationAccuracy, andTestAccuracyas 0.00% even when the network demonstrably learns #173💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.