(self, out, keepthresh=0.5)
Create a binary mask for dropout layers.

        Arguments:
            out (CPUTensor): Output tensor
            keepthresh (float): fraction of ones
Create a binary mask for dropout layers.
Create a binary mask for dropout layers .
def make_binary_mask(self, out, keepthresh=0.5):
        """
        Create a binary mask for dropout layers.

        Arguments:
            out (CPUTensor): Output tensor
            keepthresh (float): fraction of ones
        """
        out._tensor[:] = np.array(
            self.rng.uniform(size=out._tensor.shape) < keepthresh,
            dtype=out._tensor.dtype)
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 )