#NEWLINE# def answer_probabilities( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        normalise the answer groups for each question.\n        ' #NEWLINE# input = self . input_layer . output ( * args , ** kwargs ) #NEWLINE# input_clipped = T . maximum ( input , 0 ) #NEWLINE# q1 = input_clipped [ : , 0 : 3 ] #NEWLINE# q2 = input_clipped [ : , 3 : 5 ] #NEWLINE# q3 = input_clipped [ : , 5 : 7 ] #NEWLINE# q4 = input_clipped [ : , 7 : 9 ] #NEWLINE# q5 = input_clipped [ : , 9 : 13 ] #NEWLINE# q6 = input_clipped [ : , 13 : 15 ] #NEWLINE# q7 = input_clipped [ : , 15 : 18 ] #NEWLINE# q8 = input_clipped [ : , 18 : 25 ] #NEWLINE# q9 = input_clipped [ : , 25 : 28 ] #NEWLINE# q10 = input_clipped [ : , 28 : 31 ] #NEWLINE# q11 = input_clipped [ : , 31 : 37 ] #NEWLINE# q1 = ( q1 / ( q1 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q2 = ( q2 / ( q2 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q3 = ( q3 / ( q3 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q4 = ( q4 / ( q4 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q5 = ( q5 / ( q5 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q6 = ( q6 / ( q6 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q7 = ( q7 / ( q7 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q8 = ( q8 / ( q8 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q9 = ( q9 / ( q9 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q10 = ( q10 / ( q10 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# q11 = ( q11 / ( q11 . sum ( 1 , keepdims = True ) + 1e-12 ) ) #NEWLINE# return ( q1 , q2 , q3 , q4 , q5 , q6 , q5 , q8 , q9 , q10 , q11 )