There has been an explosion in interest in machine learning (ML) in recent years due to its applications to science and engineering. However, as ML techniques have advanced, tools for explaining and visualizing novel ML algorithms have lagged behind. Animation has been shown to be a powerful tool for making engaging visualizations of systems that dynamically change over time, which makes it well suited to the task of communicating ML algorithms. However, the current approach to animating ML algorithms is to handcraft applications that highlight specific algorithms or use complex generalized animation software. We developed ManimML, an open-source Python library for easily generating animations of ML algorithms directly from code. We sought to leverage ML practitioners' preexisting knowledge of programming rather than requiring them to learn complex animation software. ManimML has a familiar syntax for specifying neural networks that mimics popular deep learning frameworks like Pytorch. A user can take a preexisting neural network architecture and easily write a specification for an animation in ManimML, which will then automatically compose animations for different components of the system into a final animation of the entire neural network. ManimML is open source and available at https://github.com/helblazer811/ManimML.
翻译:近年来,机器学习在科学与工程领域的应用引发了广泛关注。然而,随着机器学习技术的进步,用于解释和可视化新颖机器学习算法的工具却相对滞后。动画已被证明是动态系统随时间演变过程中极具吸引力的可视化工具,因此非常适合传达机器学习算法的任务。但目前机器学习算法动画生成的主要方式是手工构建针对特定算法的应用程序,或使用复杂的通用动画软件。我们开发了ManimML —— 一个基于Python的开源库,能够直接从代码中轻松生成机器学习算法的动画。相较于要求用户学习复杂的动画软件,我们致力于利用机器学习从业者已有的编程知识。ManimML提供了一套类似PyTorch等主流深度学习框架的神经网络定义语法。用户只需获取现有的神经网络架构,即可在ManimML中快速编写动画规范,系统将自动组合各组件动画,最终生成整个神经网络的完整动画效果。ManimML开源且可在https://github.com/helblazer811/ManimML获取。