()
| 321 | |
| 322 | |
| 323 | def symbolic_learning_phase(): |
| 324 | graph = get_graph() |
| 325 | with graph.as_default(): |
| 326 | if graph not in _GRAPH_LEARNING_PHASES: |
| 327 | with name_scope(''): |
| 328 | phase = array_ops.placeholder_with_default( |
| 329 | False, shape=(), name='keras_learning_phase') |
| 330 | _GRAPH_LEARNING_PHASES[graph] = phase |
| 331 | return _GRAPH_LEARNING_PHASES[graph] |
| 332 | |
| 333 | |
| 334 | @keras_export('keras.backend.set_learning_phase') |
no test coverage detected