Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ios/Classes/Helpers/UIImageExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ + (nullable float*)normalize:(UIImage*)image withMean:(NSArray<NSNumber*>*)mean
normalizedBuffer[w * h * 2 + i] = (rawBytes[i * 4 + 2] / 255.0 - mean[2].floatValue) / std[2].floatValue;
}

free(rawBytes);
return normalizedBuffer;
}

Expand Down
2 changes: 2 additions & 0 deletions ios/Classes/PyTorchMobilePlugin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
} catch (const std::exception& e) {
NSLog(@"PyTorchMobile: %s", e.what());
}

free(input);

break;
}
Expand Down