Registry / Framework

framework · v0.1.1
Flightdeck huber-fit
Fit continuous targets with unit-transition Huber loss. Clip the residual influence of large errors.
Use Flightdeck huber-fit
use vendor::fd_huber_fit::huber_fit;
Run the example
nest demo fd_huber_fit@0.1.1
blyxc native-run fd_huber_fit-demo/main.blyx
Example source and expected output
use vendor::fd_huber_fit::huber_fit;
fn main() { fd_huber_fit(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.abs %v1 : tensor<2x7xf32>
%v3 = stablehlo.constant dense<1.00000000000000000e+00> : tensor<2x7xf32>
%v4 = stablehlo.minimum %v2, %v3 : tensor<2x7xf32>
%v5 = stablehlo.constant dense<5.00000000000000000e-01> : tensor<2x7xf32>
%v6 = stablehlo.multiply %v5, %v4 : tensor<2x7xf32>
%v7 = stablehlo.multiply %v6, %v4 : tensor<2x7xf32>
%v8 = stablehlo.add %v7, %v2 : tensor<2x7xf32>
%v9 = stablehlo.subtract %v8, %v4 : tensor<2x7xf32>
%v10 = stablehlo.negate %v3 : tensor<2x7xf32>
%v11 = stablehlo.maximum %v1, %v10 : tensor<2x7xf32>
%v12 = stablehlo.minimum %v11, %v3 : tensor<2x7xf32>
return %v9, %v12 : tensor<2x7xf32>, tensor<2x7xf32>
}
}
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | bf9c3d5003 | defb7429e0a19a05e4abb869bb0f81e0851a6b765f88c1296ffc406ca94ee9bf |
| 0.1.0 | Download ZIP · Browse files | d5835c5109 | 8a14676c04930bb63367e73048686a2bd169673d35d26319200c482b1bb8a9b6 |