def merge_init_structs(s0, s1):
 for k in s1['model']:
  assert (not (k in s0['model'])), ('Error: looks like parameter %s is trying to be initialized twice!' % (k,))
  s0['model'][k] = s1['model'][k]
 s0['update'].extend(s1['update'])
 s0['regularize'].extend(s1['regularize'])

def merge_init_structs ( s0 , s1 ) : for k in s1 [ 'model' ] : assert ( not ( k in s0 [ 'model' ] ) ) , ( 'Error: looks like parameter %s is trying to be initialized twice!' % ( k , ) ) s0 [ 'model' ] [ k ] = s1 [ 'model' ] [ k ] s0 [ 'update' ] . extend ( s1 [ 'update' ] ) s0 [ 'regularize' ] . extend ( s1 [ 'regularize' ] )
merge struct s1 into s0 .