1

Straightforward question really, I need to convert a Tensorflow model I have to a format that doesn't support relu6, just regular relu. My model is in the form of 3 ckpt (checkpoint) files (the data, index, and meta files). I need to be able to train the model after converting the relu layers. Can someone point me in the right direction to how to go about this. Thank you!

1 Answers1

0

That would require rewriting the tensorflow graph. One of the files in your checkpoint is a serialized tensorflow::GraphDef protocol buffer; searching for Relu6 in it and replacing those occurrences with Relu will fix the graph.

However, by far most tensorflow training scripts do not work by loading a training graph; instead they rebuild the graph at training time and load an existing checkpoint on top of the rebuilt graph. If you're in this situation you're better off changing your python training code to emit tf.relu instead of Relu6.

Alexandre Passos
  • 5,186
  • 1
  • 14
  • 19