TensorRT Freezing Keras Model to .pb

I’m trying to freeze my Tensorflow model to a .pb file in order to then conver it to a .uff file. I’m following the walk through https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#samplecode2 but I’m having trubels with the arguments and each time I resolve and issue another arise, can you please help me understand the different args.

def convert_keras_to_pb(keras_model, out_names, models_dir, model_filename):
	model = load_model(keras_model)
	K.set_learning_phase(0)
	sess = K.get_session()
	saver = saver_lib.Saver(write_version=saver_pb2.SaverDef.V2)
	checkpoint_path = saver.save(sess, 'saved_ckpt', global_step=0, latest_filename='checkpoint_state')
	graph_io.write_graph(sess.graph, '.', 'tmp.pb')
	freeze_graph.freeze_graph('./tmp.pb', '',
                          	False, checkpoint_path, out_names,
                          	"save/restore_all", "save/Const:0",
                          	models_dir+model_filename, False, "")

I wrote this

convert_keras_to_pb('./project/5epochs.h5', "activation_13/truediv", './projects/','model.pb')

method call to build the .pb file, but I get the following error

tensorflow.python.framework.errors_impl.NotFoundError: ./projects/model.pb

Please help

Hi,have you solve this problem?