'Drop entries in this matrix uniformly randomly with given probability
and set the dropped out unit to state val.'

def dropout(self, dropprob, val=0.0):

    err_code = _cudamat.dropout(CUDAMatrix.rnd_state_p, self.p_mat, ct.c_float(dropprob), ct.c_float(val))
    if err_code:
        raise generate_exception(err_code)
    return self
