tsne.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:agent-trainer 作者: lopespm 项目源码 文件源码
def save_visualization_to_image(self, inputs, outputs, folder_path_for_result_image):
        print("Computing t-SNE embedding")
        x = np.array([state.reshape(-1, ) for state in inputs])
        y = outputs
        tsne = manifold.TSNE(n_components=2, init='pca', random_state=0)
        x_tsne = tsne.fit_transform(x)
        self._tsne_plot_embedding(x=x_tsne,
                                  y=y,
                                  inputs=inputs,
                                  path_result_image=os.path.join(folder_path_for_result_image, "t-SNE.png"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号