Convert placeholder to constant in TensorFlow

Viewed 1081

I'm training neural networks in TensorFlow for use in a Java application. The graphs are written to a pb file using freeze_graph.py.

However, there are a number of placeholders in the graph that are used to hold dropout layer keep probabilities. I would like to convert these to constants (=1.0) when writing the graph, as then I don't need to worry about feeding these values when using the network in the Java application.

Is it possible to convert a placeholder into a constant?

1 Answers
Related