Quantize the 'input' tensor of type float to 'output' tensor of type 'T'. [min_range, max_range] are scalar floats that specify the range for the 'input' data. The 'mode' attribute controls exactly which calculations are used to convert the float values to their quantized equivalents. The 'round_m
(scope *Scope, input tf.Output, min_range tf.Output, max_range tf.Output, T tf.DataType, optional ...QuantizeV2Attr)
| 478 | // |
| 479 | // Returns The quantized data produced from the float input.The actual minimum scalar value used for the output.The actual maximum scalar value used for the output. |
| 480 | func QuantizeV2(scope *Scope, input tf.Output, min_range tf.Output, max_range tf.Output, T tf.DataType, optional ...QuantizeV2Attr) (output tf.Output, output_min tf.Output, output_max tf.Output) { |
| 481 | if scope.Err() != nil { |
| 482 | return |
| 483 | } |
| 484 | attrs := map[string]interface{}{"T": T} |
| 485 | for _, a := range optional { |
| 486 | a(attrs) |
| 487 | } |
| 488 | opspec := tf.OpSpec{ |
| 489 | Type: "QuantizeV2", |
| 490 | Input: []tf.Input{ |
| 491 | input, min_range, max_range, |
| 492 | }, |
| 493 | Attrs: attrs, |
| 494 | } |
| 495 | op := scope.AddOperation(opspec) |
| 496 | return op.Output(0), op.Output(1), op.Output(2) |
| 497 | } |
| 498 | |
| 499 | // QuantizeAndDequantizeV3Attr is an optional argument to QuantizeAndDequantizeV3. |
| 500 | type QuantizeAndDequantizeV3Attr func(optionalAttr) |
nothing calls this directly
no test coverage detected