@@ -1373,23 +1373,23 @@ VARP reshape(VARP x, List<int> shape, {DimensionFormat format = DimensionFormat.
13731373 return rval;
13741374}
13751375
1376- VARP scale (VARP x, int channels, List <double > scales, List <double > biases) {
1377- final (scalesPtr, scalesSize) = scales.toNativeArrayF32 ();
1378- final (biasesPtr, biasesSize) = biases.toNativeArrayF32 ();
1379- final rval = VARP .fromPointer (
1380- C .mnn_expr_Scale (
1381- x.ptr,
1382- channels,
1383- scalesPtr.cast (),
1384- scalesSize,
1385- biasesPtr.cast (),
1386- biasesSize,
1387- ),
1388- );
1389- calloc.free (scalesPtr);
1390- calloc.free (biasesPtr);
1391- return rval;
1392- }
1376+ // VARP scale(VARP x, int channels, List<double> scales, List<double> biases) {
1377+ // final (scalesPtr, scalesSize) = scales.toNativeArrayF32();
1378+ // final (biasesPtr, biasesSize) = biases.toNativeArrayF32();
1379+ // final rval = VARP.fromPointer(
1380+ // C.mnn_expr_Scale(
1381+ // x.ptr,
1382+ // channels,
1383+ // scalesPtr.cast(),
1384+ // scalesSize,
1385+ // biasesPtr.cast(),
1386+ // biasesSize,
1387+ // ),
1388+ // );
1389+ // calloc.free(scalesPtr);
1390+ // calloc.free(biasesPtr);
1391+ // return rval;
1392+ // }
13931393
13941394/// Given an input value x, it computes the output as x if x > 0 and slope * x if x <= 0.
13951395///
@@ -2091,11 +2091,12 @@ VARP GridSample(
20912091}) =>
20922092 VARP .fromPointer (C .mnn_expr_GridSample (input.ptr, grid.ptr, mode.value, paddingMode.value, alignCorners));
20932093
2094- VARP floatToInt8 (VARP x, VARP scale, int minvalue, int maxValue, {int ? zeroPoint}) => VARP .fromPointer (
2095- zeroPoint == null
2096- ? C .mnn_expr_FloatToInt8 (x.ptr, scale.ptr, minvalue, maxValue)
2097- : C .mnn_expr_FloatToInt8_1 (x.ptr, scale.ptr, minvalue, maxValue, zeroPoint),
2098- );
2094+ VARP floatToInt8 (VARP x, VARP scale, {int minvalue = - 127 , int maxValue = 127 , int ? zeroPoint}) =>
2095+ VARP .fromPointer (
2096+ zeroPoint == null
2097+ ? C .mnn_expr_FloatToInt8 (x.ptr, scale.ptr, minvalue, maxValue)
2098+ : C .mnn_expr_FloatToInt8_1 (x.ptr, scale.ptr, minvalue, maxValue, zeroPoint),
2099+ );
20992100
21002101VARP int8ToFloat (VARP x, VARP scale, {int ? zeroPoint}) => VARP .fromPointer (
21012102 zeroPoint == null
0 commit comments