Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Created October 24, 2019 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anupamchugh/72d742e8f76f42d866e92aa77e079020 to your computer and use it in GitHub Desktop.
Save anupamchugh/72d742e8f76f42d866e92aa77e079020 to your computer and use it in GitHub Desktop.
Pytorch Mobile Objective-c header file
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TorchModule : NSObject
- (nullable instancetype)initWithFileAtPath:(NSString*)filePath
NS_SWIFT_NAME(init(fileAtPath:))NS_DESIGNATED_INITIALIZER;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
- (NSInteger)predictImage:(void*)imageBuffer forLabels:(NSInteger)labelCount
NS_SWIFT_NAME(predict(image:labelCount:));
@end
NS_ASSUME_NONNULL_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment