Memory Error in numpy array creation

X = np.empty((m,*target_size,3)) is giving a memory error. Pls tell what can I do to solve this error.

Hey @Tanishq-Chaudhary-2660485557354404, can you please upload your code on google drive and share the link here ?
I need to see the code or the error to help you out .

https://drive.google.com/file/d/1hdBpJaYh10f5NBTJP3puwiCr2CCxddf5/view?usp=sharing

Hey @Tanishq-Chaudhary-2660485557354404, it seems you ran out of memory while running this code. I would suggest you to run the code from scratch once again. If the error still persists then try google colab.

Hope this helps.
All the best :+1:

I tried to run the code on google colab but still causing problem. It sows that all ram used and automatically restarting.

well i am able to run the code if I reduce the target size. So i think it’s the only possible way to remove this error as the no. of computation are increasing significantly by increasing target size.

Yes then it gives you a message, get more ram ?? …on google colab itself…u can try that if u want. You can get a RAM of 24GB on google colab.

I think that option comes with the google colab pro. But it’s fine, atleast I know the problem. Thank you for the help.

No no you get it for the normal user on google colab on the left hand side bottom of the page. Anyways it’s great that your doubt is resolved.

Happy Learning !
All the best :slight_smile: