'Create a binary mask for dropout layers.
Arguments:
out (CPUTensor): Output tensor
keepthresh (float): fraction of ones'

def make_binary_mask(self, out, keepthresh=0.5):

    out._tensor[:] = np.array((self.rng.uniform(size=out._tensor.shape) < keepthresh), dtype=out._tensor.dtype)
