Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix memory leak in LTRTrainer._update_stats().#313

Open
Capricorn231 wants to merge 1 commit into
visionml:mastervisionml/pytracking:masterfrom
Capricorn231:memleak-fixCapricorn231/pytracking:memleak-fixCopy head branch name to clipboard
Open

Fix memory leak in LTRTrainer._update_stats().#313
Capricorn231 wants to merge 1 commit into
visionml:mastervisionml/pytracking:masterfrom
Capricorn231:memleak-fixCapricorn231/pytracking:memleak-fixCopy head branch name to clipboard

Conversation

@Capricorn231

Copy link
Copy Markdown

The method _update_stats() is called with val, which is a Tensor with gradients. When use with AverageMeter, the gradient graph will be accumulated during training and won't be released and collected by GC, causing significant memory leak.

@martin-danelljan

Copy link
Copy Markdown
Contributor

val is not necessarily always a tensor. So we need to have a check if its actually a tensor first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.