MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / symbolic_learning_phase

Function symbolic_learning_phase

tensorflow/python/keras/backend.py:323–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321
322
323def 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')

Callers 1

learning_phaseFunction · 0.85

Calls 3

get_graphFunction · 0.85
name_scopeFunction · 0.70
as_defaultMethod · 0.45

Tested by

no test coverage detected