(self, batch)
return cond, mask, discrete_column_id, category_id_in_col
Generate the conditional vector for training.

        Returns:
            cond (batch x #categories):
                The conditional vector.
            mask (batch x #discrete columns):
                A one-hot vector indicating the selected discrete column.
            discrete column id (batch):
                Integer representation of mask.
            category_id_in_col (batch):
                Selected category in the selected discrete column.
Generate the conditional vector for training.
Generate the conditional vector for training .
def sample_condvec(self, batch):
        """Generate the conditional vector for training.

        Returns:
            cond (batch x #categories):
                The conditional vector.
            mask (batch x #discrete columns):
                A one-hot vector indicating the selected discrete column.
            discrete column id (batch):
                Integer representation of mask.
            category_id_in_col (batch):
                Selected category in the selected discrete column.
        """
        if self._n_discrete_columns == 0:
            return None

        discrete_column_id = np.random.choice(
            np.arange(self._n_discrete_columns), batch)

        cond = np.zeros((batch, self._n_categories), dtype='float32')
        mask = np.zeros((batch, self._n_discrete_columns), dtype='float32')
        mask[np.arange(batch), discrete_column_id] = 1
        category_id_in_col = self._random_choice_prob_index(discrete_column_id)
        category_id = (self._discrete_column_cond_st[discrete_column_id] + category_id_in_col)
        cond[np.arange(batch), category_id] = 1

        return cond, mask, discrete_column_id, category_id_in_col
def sample_condvec ( self , batch ) : if self . _n_discrete_columns == 0 : return None discrete_column_id = np . random . choice ( np . arange ( self . _n_discrete_columns ) , batch ) cond = np . zeros ( ( batch , self . _n_categories ) , dtype = 'float32' ) mask = np . zeros ( ( batch , self . _n_discrete_columns ) , dtype = 'float32' ) mask [ np . arange ( batch ) , discrete_column_id ] = 1 category_id_in_col = self . _random_choice_prob_index ( discrete_column_id ) category_id = ( self . _discrete_column_cond_st [ discrete_column_id ] + category_id_in_col ) cond [ np . arange ( batch ) , category_id ] = 1 return cond , mask , discrete_column_id , category_id_in_col