def top_topic_docs(self, doc_topic_matrix,
                       topics=-1, top_n=10, weights=False):
        if topics == -1:
            topics = range(self.n_topics)
        elif isinstance(topics, int):
            topics = (topics,)

        for topic_idx in topics:
            top_doc_idxs = np.argsort(doc_topic_matrix[:, topic_idx])[:-top_n - 1:-1]
            if weights is False:
                yield (topic_idx,
                       tuple(doc_idx for doc_idx in top_doc_idxs))
            else:
                yield (topic_idx,
                       tuple((doc_idx, doc_topic_matrix[doc_idx, topic_idx]) for doc_idx in top_doc_idxs))
Create the encoding layers for supervised finetuning.
dataset/ETHPy150Open chartbeat-labs/textacy/textacy/tm/topic_model.py/TopicModel.top_topic_docs--crossover with--dataset/ETHPy150Open blackecho/Deep-Learning-TensorFlow/models/autoencoder_models/stacked_denoising_autoencoder.py/StackedDenoisingAutoencoder._create_encoding_layers