Difference in batch size available for PyTorch and Tensorflow on the same GPU
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 365
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 1
Description
With changing the batch size, I tried both PyTorch and Tensorflow versions of RandLANet on SemanticKITTI. For PyTorch, I could start training with batch size 5, while I could not with batch size 6 due to CUDA out of memory error. For Tensorflow, I could with batch size 2, while I could not with batch size 3 due to error message "ResourceExhaustedError: OOM when allocating ...". So, I could only use half the batch size in Tensorflow on the same GPU. The code that I use is
```
import os
import open3d.ml as _ml3d
#import open3d.ml.torch as ml3d
import open3d.ml.tf as ml3d
import pprint
cfg_file = "ml3d/configs/randlanet_semantickitti.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)
model = ml3d.models.RandLANet(**cfg.model)
cfg.dataset['dataset_path'] = "./"
dataset = ml3d.datasets.SemanticKITTI(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
pipeline = ml3d.pipelines.SemanticSegmentation(model, dataset=dataset, device="gpu", **cfg.pipeline)
pipeline.cfg_tb = {
"readme": "readme",
"cmd_line": "cmd_line",
"dataset": pprint.pformat(cfg.dataset, indent=2),
"model": pprint.pformat(cfg.model, indent=2),
"pipeline": pprint.pformat(cfg.pipeline, indent=2),
}
pipeline.run_train()
```
I'd like to know where the problem lies and how to solve it.
Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.