- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for sqDiff (0.18 sec)
-
tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/math.mlir
^bb0(%arg0: tensor<4xf32>): // CHECK: [[CONST:%.*]] = "tfl.pseudo_const"() <{value = dense<1.000000e+00> : tensor<4xf32>}> : () -> tensor<4xf32> // CHECK-NEXT: [[SQDIFF:%.*]] = tfl.squared_difference %arg0, [[CONST]] : tensor<4xf32> // CHECK-NEXT: %{{.*}} = tfl.mul %arg0, [[SQDIFF]] {fused_activation_function = "NONE"} : tensor<4xf32> %0 = "tfl.pseudo_const" () {value = dense<1.0> : tensor<4xf32>} : () -> tensor<4xf32> loc("Const")
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 1.4K bytes - Viewed (0) -
src/image/color/color.go
ret, bestSum := 0, uint32(1<<32-1) for i, v := range p { vr, vg, vb, va := v.RGBA() sum := sqDiff(cr, vr) + sqDiff(cg, vg) + sqDiff(cb, vb) + sqDiff(ca, va) if sum < bestSum { if sum == 0 { return i } ret, bestSum = i, sum } } return ret } // sqDiff returns the squared-difference of x and y, shifted by 2 so that // adding four of those won't overflow a uint32. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 8.3K bytes - Viewed (0) -
src/image/draw/draw_test.go
-0x7ffffffe, -0x80000000, } for _, x := range testCases { for _, y := range testCases { if got, want := sqDiff(x, y), orig(x, y); got != want { t.Fatalf("sqDiff(%#x, %#x): got %d, want %d", x, y, got, want) } } } if err := quick.CheckEqual(orig, sqDiff, &quick.Config{MaxCountScale: 10}); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 18:07:05 UTC 2023 - 26K bytes - Viewed (0) -
src/image/draw/draw.go
// TODO(nigeltao): consider smarter algorithms. bestIndex, bestSum := 0, uint32(1<<32-1) for index, p := range palette { sum := sqDiff(er, p[0]) + sqDiff(eg, p[1]) + sqDiff(eb, p[2]) + sqDiff(ea, p[3]) if sum < bestSum { bestIndex, bestSum = index, sum if sum == 0 { break } } } pix[y*stride+x] = byte(bestIndex)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:08:05 UTC 2024 - 33.9K bytes - Viewed (0) -
src/net/http/sniff.go
ct: "text/plain; charset=utf-8", }, // Image types // For posterity, we originally returned "image/vnd.microsoft.icon" from // https://tools.ietf.org/html/draft-ietf-websec-mime-sniff-03#section-7 // https://codereview.appspot.com/4746042 // but that has since been replaced with "image/x-icon" in Section 6.2 // of https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 20 21:51:06 UTC 2022 - 7.9K bytes - Viewed (0) -
src/image/format.go
if len(magic) != len(b) { return false } for i, c := range b { if magic[i] != c && magic[i] != '?' { return false } } return true } // sniff determines the format of r's data. func sniff(r reader) format { formats, _ := atomicFormats.Load().([]format) for _, f := range formats { b, err := r.Peek(len(f.magic)) if err == nil && match(f.magic, b) { return f } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/tests/unfuse_mhlo_batch_norm.mlir
// CHECK-DAG: %[[SQ_DIFF:.+]] = "tf.SquaredDifference"(%arg0, %[[MEAN_BCAST]]) : (tensor<3x4x256x6xf32>, tensor<3x4x256x6xf32>) -> tensor<3x4x256x6xf32> // CHECK-DAG: %[[VARIANCE:.+]] = "tf.Mean"(%[[SQ_DIFF]], %[[CST_AXIS]]) <{keep_dims = false}> : (tensor<3x4x256x6xf32>, tensor<3xi32>) -> tensor<256xf32>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 06 15:32:52 UTC 2024 - 10.4K bytes - Viewed (0) -
src/debug/dwarf/open.go
pubnames: pubnames, ranges: ranges, str: str, abbrevCache: make(map[uint64]abbrevTable), typeCache: make(map[Offset]Type), typeSigs: make(map[uint64]*typeUnit), } // Sniff .debug_info to figure out byte order. // 32-bit DWARF: 4 byte length, 2 byte version. // 64-bit DWARf: 4 bytes of 0xff, 8 byte length, 2 byte version. if len(d.info) < 6 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 18 19:33:30 UTC 2023 - 4.1K bytes - Viewed (0) -
src/net/http/sniff_test.go
} else if !bytes.Equal(data, tt.data) { t.Errorf("%v: data is %q, want %q", tt.desc, data, tt.data) } resp.Body.Close() } } // Issue 5953: shouldn't sniff if the handler set a Content-Type header, // even if it's the empty string. func TestServerIssue5953(t *testing.T) { run(t, testServerIssue5953) } func testServerIssue5953(t *testing.T, mode testMode) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 07 16:53:14 UTC 2022 - 9.6K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
// not get all the errors we expected. completed = true case "not-declared": sniff[i] |= notDeclared case "not-type": sniff[i] |= notType case "not-int-const": sniff[i] |= notIntConst case "not-num-const": sniff[i] |= notNumConst case "not-str-lit": sniff[i] |= notStrLiteral default: if isError { sawUnmatchedErrors = true } continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0)