microsoft / MMdnn

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
MIT License
5.78k stars 966 forks source link

Cafee to Tensorflow model too big #415

Open GalacticF opened 5 years ago

GalacticF commented 5 years ago

Platform (ubuntu 16.04):

Python version:

Source framework with version (caffe-gpu):

Destination framework with version (tensorflow-gpu==1.10.1):

I have converted caffe model to tensorflow. On caffe this model requires about 600 mb on GPU, but TF version requires 3Gb. It is a normal situation for the converted model?

GalacticF commented 5 years ago

config.gpu_options.allow_growth=True

namizzz commented 5 years ago

Hi @GalacticF , I learned from this. In the Allowing GPU memory growth part, it says that Note that we do not release memory, since that can lead to even worse memory fragmentation. To turn this option on, set the option in the ConfigProto