def broadcasted_add(a, b):
 return (a.dimshuffle(2, 'x', 1, 0) + b)

def broadcasted_add ( a , b ) : return ( a . dimshuffle ( 2 , 'x' , 1 , 0 ) + b )
a: a 3d theano tensor b: a 4d theano tensor returns c .