I have a real problem with converting Keras model's convolutional kernels and most preferably dense weights (but that is not my priority) from theano to tensorflow. I made some research but I just can't handle it. First I used this script: Keras: convert pretrained weights between theano and tensorflow
But than my accuracy fell from 85% to worse than random (12% in 8 classes) so I guess something is wrong with it.
Than I tried to use titu1994 code aka: https://github.com/titu1994/Keras-Classification-Models/blob/master/weight_conversion_theano.py
Although I just can't get it done because I get error during the script about running OOM on my paperspace virtual machine and I can't get access to better one. The weights are vgg16_bn.h5 from fast.ai deep learning course. I would highly appreciate any help if you had similiar problem before or maybe if some1 had converted these weights to tensorflow format I would love if you decide to share.
Or if you know other weights and models I can succesfully perform transfer learning from I would appreciate if you share as well.