Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

CPU memory usage is high #139

Open
LiheYoung opened this issue Oct 10, 2019 · 1 comment
Open

CPU memory usage is high #139

LiheYoung opened this issue Oct 10, 2019 · 1 comment
Labels

Comments

@LiheYoung
Copy link

The cpu memory usage is high when training on Cityscapes. I didn't crop the image, and input size is 1024x2048. Larger size may lead to higher GPU memory usage but my GPU memory usage is okay(around 11G), the cpu memory usage is high(around 80%). Sometimes it may be killed because it cannot allocate memory.

@wkentaro
Copy link
Owner

Maybe this visualized image is too large in your case?

if len(visualizations) < 9:
viz = fcn.utils.visualize_segmentation(
lbl_pred=lp, lbl_true=lt, img=img, n_class=n_class)
visualizations.append(viz)

Those visualized images are tiled to create another large image.

out = osp.join(self.out, 'visualization_viz')
if not osp.exists(out):
os.makedirs(out)
out_file = osp.join(out, 'iter%012d.jpg' % self.iteration)
skimage.io.imsave(out_file, fcn.utils.get_tile_image(visualizations))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants