#NEWLINE# @ classmethod #NEWLINE# def gen_class( cls , pdict ) : #NEWLINE# #INDENT# for key in [ 'init' , 'bias' , 'activation' ] : #NEWLINE# #INDENT# if ( ( key in pdict ) and ( pdict [ key ] is not None ) ) : #NEWLINE# #INDENT# cname = pdict [ key ] [ 'type' ] #NEWLINE# icls = load_class ( cname ) #NEWLINE# if ( 'config' not in pdict [ key ] ) : #NEWLINE# #INDENT# pdict [ key ] [ 'config' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# pdict [ key ] = icls ( ** pdict [ key ] [ 'config' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return cls ( ** pdict )