Created by: shippingwang
It selects elements of the input tensor according to the mask tensor. Note: The shapes of the mask tensor don't have to match the shapes of input tensor, but they must be broadcastable, and the result is a new 1-D tensor.
NOTE: As the broadcast function is not elegantly implemented in PaddlePaddle, we assume the broadcastable concept in here is consistent with api:expand_as