caffe所需内存如何计算?
caffe memory required how to calculate?
当你想训练一个网络时,你会得到如下日志信息:
Memory required for data: 493376512
你如何解读这个数字?是字节还是比特?
查看 shelhamer 的评论:
https://github.com/BVLC/caffe/issues/2387#issuecomment-97910200
It's the memory required for all the top blobs or "data" in the sense
of layer outputs. It excludes the diffs, the parameters, and any
intermediate blobs within layers. @jeffdonahue do you remember the
motivation for this number?
还有longjon:
Since layers are individually responsible for allocating parameters
and buffers, there's no way in general to know the total amount of
memory required except by running a forward pass.
为了回答您的直接问题,图层的内存使用量以字节为单位,而不是位。
总的来说,报告的内存是层所需的所有内存,可以在初始化时计算。参数和缓冲区 space 是根据需要分配的,因此以总和的形式报告它们没有用——由于序列化重用,其中一些可能占用的总内存较少。
正如一个答案所说,确定最大内存使用量的最有效方法是 运行 向前传球并抓住它的高水位线。
当你想训练一个网络时,你会得到如下日志信息:
Memory required for data: 493376512
你如何解读这个数字?是字节还是比特?
查看 shelhamer 的评论: https://github.com/BVLC/caffe/issues/2387#issuecomment-97910200
It's the memory required for all the top blobs or "data" in the sense of layer outputs. It excludes the diffs, the parameters, and any intermediate blobs within layers. @jeffdonahue do you remember the motivation for this number?
还有longjon:
Since layers are individually responsible for allocating parameters and buffers, there's no way in general to know the total amount of memory required except by running a forward pass.
为了回答您的直接问题,图层的内存使用量以字节为单位,而不是位。
总的来说,报告的内存是层所需的所有内存,可以在初始化时计算。参数和缓冲区 space 是根据需要分配的,因此以总和的形式报告它们没有用——由于序列化重用,其中一些可能占用的总内存较少。
正如一个答案所说,确定最大内存使用量的最有效方法是 运行 向前传球并抓住它的高水位线。