Blyx Nest Blyx language
Registry / Framework
framework · v0.1.1

Flightdeck pseudo-huber

Use a smooth robust regression objective and its bounded influence function with scale one.

Source repository · Package JSON

Use Flightdeck pseudo-huber

use vendor::fd_pseudo_huber::pseudo_huber;

Run the example

nest demo fd_pseudo_huber@0.1.1
blyxc native-run fd_pseudo_huber-demo/main.blyx
Example source and expected output
use vendor::fd_pseudo_huber::pseudo_huber;
fn main() { fd_pseudo_huber(2, 7); }

Expected output

module {
  func.func @main(%x: tensor<2x7xf32>, %target: tensor<2x7xf32>) -> (tensor<2x7xf32>, tensor<2x7xf32>) {
    %v0 = stablehlo.constant dense<0.00000000000000000e+00> : tensor<2x7xf32>
    %v1 = stablehlo.subtract %x, %target : tensor<2x7xf32>
    %v2 = stablehlo.constant dense<1.00000000000000000e+00> : tensor<2x7xf32>
    %v3 = stablehlo.multiply %v1, %v1 : tensor<2x7xf32>
    %v4 = stablehlo.add %v2, %v3 : tensor<2x7xf32>
    %v5 = stablehlo.sqrt %v4 : tensor<2x7xf32>
    %v6 = stablehlo.add %v5, %v2 : tensor<2x7xf32>
    %v7 = stablehlo.divide %v3, %v6 : tensor<2x7xf32>
    %v8 = stablehlo.divide %v1, %v5 : tensor<2x7xf32>
    return %v7, %v8 : tensor<2x7xf32>, tensor<2x7xf32>
  }
}

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filesbf9c3d5003c3b402cb01cc5a7d90b6d2cd897a3cf9de236e99844355cc5b61ca7b44a0f6fd
0.1.0Download ZIP · Browse filesd5835c5109334f81ced12e16b2a3a5f8715355ffc29b72b855f2e582f9bf43b6ef5e2dbcd8