def _training_mode_application_calls(application_calls):
 from ..bricks import BatchNormalization
 out = []
 for app_call in application_calls:
  assert isinstance(app_call.application.brick, BatchNormalization)
  assert (app_call.application.application == BatchNormalization.apply)
  if app_call.metadata.get('training_mode', False):
   out.append(app_call)
 return out

def _training_mode_application_calls ( application_calls ) : from . . bricks import BatchNormalization out = [ ] for app_call in application_calls : assert isinstance ( app_call . application . brick , BatchNormalization ) assert ( app_call . application . application == BatchNormalization . apply ) if app_call . metadata . get ( 'training_mode' , False ) : out . append ( app_call ) return out
filter for application calls made in training mode .