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"))
评论列表
文章目录