#NEWLINE# def check_weight_decay( self ) : #NEWLINE# #INDENT# self . optimizer . weight_decay ( 0.1 ) #NEWLINE# g = cuda . to_cpu ( g . target . param . grad ) #NEWLINE# expect = np . array ( [ 0.0 , 1.1 , 2.2 ] , dtype = np . float32 ) #NEWLINE# gradient_check . assert_allclose ( g , expect )