diff options
| author | Jean-Philippe Mercier <jpmercier87@gmail.com> | 2017-11-02 18:02:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-02 18:02:02 -0400 |
| commit | df16bf1b18e03213efe9b22a0155b833a06c6a9c (patch) | |
| tree | ccaf0cf9662c0a1057d95e660945f149f64387cd | |
| parent | 9d1bc76e6a4f791a25db1179c7c2b4c62a8d55cd (diff) | |
gpu memory leaks
A tensor is now fed to ImagePool() instead of a Variable
| -rw-r--r-- | util/image_pool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/image_pool.py b/util/image_pool.py index 152ef5b..9f34a09 100644 --- a/util/image_pool.py +++ b/util/image_pool.py @@ -13,7 +13,7 @@ class ImagePool(): if self.pool_size == 0: return images return_images = [] - for image in images.data: + for image in images: image = torch.unsqueeze(image, 0) if self.num_imgs < self.pool_size: self.num_imgs = self.num_imgs + 1 |
