#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# y1 = numpy . arange ( 4 ) . astype ( numpy . float32 ) #NEWLINE# y2 = ( numpy . arange ( 4 ) . astype ( numpy . float32 ) + 1 ) #NEWLINE# gx1 = numpy . arange ( 3 ) . astype ( numpy . float32 ) #NEWLINE# gx2 = None #NEWLINE# gy1 = numpy . arange ( 4 ) . astype ( numpy . float32 ) #NEWLINE# gy2 = numpy . arange ( 4 ) . astype ( numpy . float32 ) #NEWLINE# f = chainer . Function ( ) #NEWLINE# f . check_type_forward = mock . MagicMock ( ) #NEWLINE# f . forward_cpu = mock . MagicMock ( return_value = ( gx1 , y2 ) ) #NEWLINE# f . forward_gpu = mock . MagicMock ( ) #NEWLINE# f . backward_cpu = mock . MagicMock ( return_value = ( gx1 , gx2 ) ) #NEWLINE# f . backward_gpu = mock . MagicMock ( ) #NEWLINE# self . f = f #NEWLINE# self . x1 = numpy . arange ( 3 ) . astype ( numpy . float32 ) #NEWLINE# self . x2 = numpy . arange ( 3 ) . astype ( numpy . int32 ) #NEWLINE# self . y1 = y1 #NEWLINE# self . y2 = y2 #NEWLINE# self . gx1 = gx1 #NEWLINE# self . gx2 = gx2 #NEWLINE# self . gy1 = gy1 #NEWLINE# self . gy2 = gy2