-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
Describe the bug
onnx_tf allocates a lot of memory on the GPU (two GPUs, actually) in the prepare function despite the device='CPU' parameter being present. This leads to out of memory crashes. It is also very slow.
To Reproduce
Download resnet50 from the model zoo and unpack into /tmp.
import onnx
from onnx_tf.backend import prepare
onnx_model = onnx.load('/tmp/resnet50/model.onnx')
prepare(onnx_model, device='CPU')
The primary GPU now has memory usage of 7705MiB and the secondary of 4573MiB.
Python, ONNX, ONNX-TF, Tensorflow version
This section can be obtained by running get_version.py from util folder.
- Python version: 3.5.2
- ONNX version: 1.3.0
- ONNX-TF version: 1.2.0
- Tensorflow version: 1.8.0
theotheo and magicKD
Metadata
Metadata
Assignees
Labels
No labels