TypeError: Um op fora do código de criação de função está sendo passado para um tensor de gráfico

Estou recebendo a seguinte exceção 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...