Thanks @ptrblck for the reply. I noticed that this exception occurs when the model in python is not quantised. The exception I got happened for mobilenetv3 faster rcnn and retinanet. However, when I built a model with quantisation layers then I do not get an exception.
I will try your suggestion and see how it goes.
Update
I did try to clone the tensor but still met with memory exception in another thread. Maybe IOS does not allow running of large models, since the detect function manages to run without errors for quantised models.