Saving CNN into OpenCV compatible format