首页 > 解决方案 > 如何在 google colab notebook 中设置 java 最大堆空间?

问题描述

我知道您必须使用 xx 来设置最大堆大小。但是你如何在 colab notebook 中做到这一点。

我正在尝试!java -Xmx8g。这是正确的吗?

标签: javamemoryout-of-memorygoogle-colaboratory

解决方案


如果您使用的是python-weak-wrapper,请使用以下命令:

jvm.start(max_heap_size="512m")

来源:https ://fracpete.github.io/python-weka-wrapper3/api.html


推荐阅读