Convert placeholder to constant in TensorFlow

I am training neural networks in TensorFlow for use in a Java application. Graphs are written to the pb file using freeze_graph.py

.

However, there are several placeholders in the graph that are used to store the probability of the residual level. I would like to convert them to constants (= 1.0) when writing the graph, since then I don't have to worry about feeding these values โ€‹โ€‹when using the web in a Java application.

Is it possible to convert a placeholder to a constant?

+3


source to share


1 answer


What is closer to you is this placeholder_with_default

. It is a placeholder that defaults when not served.



You can either load it with the value you want, or just forget about it and let it take on the default value you specified.

+1


source







All Articles