Tests


Content:

public class HuberLossGpuTests

Language: C#

Verification tests for GPU-accelerated HuberLoss implementation

These tests verify that:

  1. HuberLoss correctly computes loss values on GPU
  2. Gradients are computed correctly
  3. GPU operations stay on GPU device
  4. CPU fallback works correctly
  5. All GPU math operations (Abs, Where, Comparisons) work as expected

public class MockCpuDevice : IComputeDevice

Language: C#

Mock CPU device for testing