Skip to content

Commit ce88c26

Browse files
committed
ready for merge
1 parent 2d9ede8 commit ce88c26

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

android/src/main/java/io/fynn/pytorch_mobile/PyTorchMobilePlugin.java

-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
116116
// Custom std
117117
ArrayList<Double> _std = call.argument("std");
118118
std = Convert.toFloatPrimitives(_std.toArray(new Double[0]));
119-
120-
121119

122120
imageModule = modules.get(index);
123121

lib/model.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ class Model {
3131
{List<double> mean = TORCHVISION_NORM_MEAN_RGB,
3232
List<double> std = TORCHVISION_NORM_STD_RGB}) async {
3333
// Assert mean std
34-
assert(mean.length == 3, "Mean should have size of 3");
35-
assert(std.length == 3, "STD should have size of 3");
34+
assert(mean.length == 3, "mean should have size of 3");
35+
assert(std.length == 3, "std should have size of 3");
36+
3637
List<String> labels = await _getLabels(labelPath);
3738
List byteArray = image.readAsBytesSync();
3839
final List? prediction = await _channel.invokeListMethod("predictImage", {

0 commit comments

Comments
 (0)