TypeError: una operación fuera del código de construcción de funciones pasa un tensor Graph

Recibo la siguiente excepción TypeError: An op outside of the function building code is being passed a "Graph" tensor. It is possible to have Graph tensors leak out of the function building context by including a tf.init_scope in your function building code. For example, the following function...