mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

MXNet fcnxs examples: GPU memory usage varies during training.

Open KeLipeng opened this issue 9 years ago • 9 comments

When training the fcnxs examples, the GPU memory varies from 3GB to the MAX GPU Memory, which looks like a GPU memory leak problem. Did anybody get the same issue? Also, how can we see the feature map when testing on an image? I mean, how can I see a specific layer's output without defining it as the output in the symbol file.

KeLipeng avatar Apr 09 '17 15:04 KeLipeng

  1. Same here. It's related to the image size. the symbols are bound each time a new image coming.
  2. The monitor is what you looking for. Or you can define some simple debug symbol.

Godricly avatar Apr 10 '17 03:04 Godricly

Thanks, I got it. It is the image size that varies the GPU memory usage. (I forget that the input size varies)

KeLipeng avatar Apr 10 '17 08:04 KeLipeng

Similar issue regarding feature map: #5150

eric-haibin-lin avatar Apr 11 '17 03:04 eric-haibin-lin

Thanks, Haibin, I found that before, but actually I am looking for some method that could enable me to monitor the feature maps without predefining it as output in symbol file.

Lipeng

On Tue, Apr 11, 2017 at 11:47 AM, Haibin Lin [email protected] wrote:

Similar issue regarding feature map: #5150 https://github.com/dmlc/mxnet/issues/5150

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmlc/mxnet/issues/5748#issuecomment-293141797, or mute the thread https://github.com/notifications/unsubscribe-auth/AZrAF4lZRRvJE9j__avpGypHlGmYuNruks5ruve_gaJpZM4M4Dkk .

KeLipeng avatar Apr 12 '17 00:04 KeLipeng

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!

szha avatar Sep 29 '17 18:09 szha

@apache/mxnet-committers: This issue has been inactive for the past 90 days. It has no label and needs triage.

For general "how-to" questions, our user forum (and Chinese version) is a good place to get help.

szha avatar Dec 30 '17 00:12 szha

Proposed Label: Bug, Memory, Performance, Example

SuperLinguini avatar Mar 20 '18 16:03 SuperLinguini

@KeLipeng it looks like you now understand the primary issue of variable gpu memory usage, so going to request for this issue to be closed. Just to confirm, you were seeing this effect because the input images were of different sizes, leading to different sized feature maps and thus different amounts of memory used.

With regards to the secondary question related to inspecting feature maps. You have to specify it as an output to your model with Module API. What problem does this cause? But with Gluon API (before hybridizing) you can inspect feature maps and kernels really easily. Since you have access to the array values you can calculate summary statistics, plot images, etc. Also I'd recommend this tutorial for visualizing CNNs.

thomelane avatar Aug 17 '18 19:08 thomelane

@yzhliu should be good to close this issue, thanks!

thomelane avatar Aug 17 '18 19:08 thomelane