Hi, I am trying to load a caffe2 DenseNet model in iPhone SE running iOS 11. the init and predict model files are 4MB and 115KB respectively.
This is my code snippet.
I know I have commented the input to the model.But even if I uncomment it it is giving the same error "Message from debugger: Terminated due to memory issue".
if I load other caffe2 models(.pb files) taken from the internet It is not giving any memory error.
The error is basically from
_predictor->run(input_vec,&output_vec);
if I comment this line, there are no errors..so I think the model has Benn loaded successfully in the line
_predictor = new caffe2::Predictor(_initNet,_predictNet);
Maybe the model is expecting the input in certain format.
Try changing the input values, maybe in the format of (1,32,2,1600).
since iPhone SE has RAM of 2GB, a larger input will terminate the process.
Hi, I am trying to load a caffe2 DenseNet model in iPhone SE running iOS 11. the init and predict model files are 4MB and 115KB respectively. This is my code snippet.
Caffe2.h file contents
Caffe2.mm file Contents
Contents of viewController.swift
I know I have commented the input to the model.But even if I uncomment it it is giving the same error "Message from debugger: Terminated due to memory issue".
if I load other caffe2 models(.pb files) taken from the internet It is not giving any memory error.
The error is basically from
_predictor->run(input_vec,&output_vec);
if I comment this line, there are no errors..so I think the model has Benn loaded successfully in the line
_predictor = new caffe2::Predictor(_initNet,_predictNet);
Any help is really appreciated.Thanks