[英]Raspberry Pi 4 - 8gb RAM, 64gb SD Card Running Out of Memory Trying to Load Tensorflow Model
I have a problem I'm not sure how to tackle.我有一个问题,我不知道如何解决。
I currently am trying to run a program with JupyterLab on my Raspberry Pi 4, but when trying to load a Tensorflow Model, I get the following warning in the terminal:我目前正在尝试在 Raspberry Pi 4 上使用 JupyterLab 运行程序,但是在尝试加载 Tensorflow 模型时,我在终端中收到以下警告:
Allocation of 360087552 exceeds 10% of free system memory
360087552 的分配超过可用系统内存的 10%
Now, this is confounding to me.现在,这让我感到困惑。 The model it's trying to load is only about 900mb.
它试图加载的模型只有大约 900mb。 The Raspberry Pi model I have has 8gb of RAM, same as my laptop.
我的 Raspberry Pi 型号有 8GB 的 RAM,与我的笔记本电脑相同。 It's using a 64gb SD card with 42.8gb free space (more than my laptop).
它使用具有 42.8gb 可用空间的 64gb SD 卡(比我的笔记本电脑还多)。 Yet, despite having the same amount of RAM and more free space than my laptop (which runs everything without issue), it is unable to load the model, and the kernel crashes.
然而,尽管与我的笔记本电脑(它可以毫无问题地运行所有东西)相比,它具有相同数量的 RAM 和更多的可用空间,但它无法加载模型,并且内核崩溃了。
I've already done everything I could think of to free up memory, including Expanding the Filesystem and increasing the Memory Split to 256 in the raspi-config, and increasing the CONF_SWAPSIZE to 1024.我已经做了我能想到的所有事情来释放内存,包括扩展文件系统和在 raspi-config 中将内存拆分增加到 256,并将 CONF_SWAPSIZE 增加到 1024。
So, is there anything further I can do to try to resolve this issue, or is this merely a limitation of the Raspberry Pi 4, and should I look into alternative and more powerful single board computers?那么,我还能做些什么来尝试解决这个问题,或者这仅仅是 Raspberry Pi 4 的一个限制,我是否应该寻找替代且功能更强大的单板计算机?
Thanks for the help,谢谢您的帮助,
Sam山姆
My suspicion is that you're using the 32 bit os with pae, that only allows 3gb per process.我怀疑您使用的是带有 pae 的 32 位操作系统,每个进程只允许 3gb。 The allocation given would exceed that.
给出的分配将超过那个。 Did you try with the 64 bit os?
您是否尝试过 64 位操作系统?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.