我们如何大致计算运行一个程序需要多少内存?

2024-04-25 01:57:23 发布

您现在位置:Python中文网/ 问答频道 /正文

今天我试着实现object detection api in tensorflow。在完成培训过程后,我试着运行程序到detect objects in webcam。当我运行它时,终端上打印了下面的消息

Allocator (GPU_0_bfc) ran out of memory trying to allocate 2.05GiB with freed_by_count=0. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available

由于性能问题,我似乎得到了很多false positives。为了运行这个程序how much memory is necessary? 更进一步说,我们如何计算任何程序所需的内存? 附言:我不是问它使用了多少内存,我们可以查出来。I am using python。你知道吗


Tags: 内存in程序api终端objectsthatobject