Modern deep learning frameworks provide imperative, eager execution programming interfaces embedded in Python to provide a productive development experience. However, deep learning practitioners sometimes need to capture and transform program structure for performance optimization, visualization, analysis, and hardware integration. We study the different designs for program capture and transformation used in deep learning. By designing for typical deep learning use cases rather than long tail ones, it is possible to create a simpler framework for program capture and transformation. We apply this principle in torch.fx, a program capture and transformation library for PyTorch written entirely in Python and optimized for high developer productivity by ML practitioners. We present case studies showing how torch.fx enables workflows previously inaccessible in the PyTorch ecosystem.
TorchSurv: A Lightweight Package for Deep Survival Analysis
Novartis Pharma AG(诺华制药公司);Center for Devices and Radiological Health, Food and Drug Administration(美国食品药品监督管理局器械和放射卫生中心);Novartis Pharmaceuticals Corporation(诺华制药公司)
TorchCP: A Python Library for Conformal Prediction
Southern University of Science and Technology(南方科技大学);Nanyang Technological University(南洋理工大学);Nanjing University(南京大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳))
DQC: a Python program package for Differentiable Quantum Chemistry
University of Oxford(牛津大学);Molecular Sciences Software Institute(分子科学软件研究所);STFC Rutherford Appleton Laboratory(STFC卢瑟福·阿普尔顿实验室)
自动微分代表了科学编程中的范式转变,大多数应用程序都需要评估函数及其导数。通过消除显式导出梯度表达式的需要,可以缩短开发时间,并简化计算。由于这些原因,自动微分在过去十年中推动了各种复杂机器学习技术的快速发展,但现在也越来越多地显示出其支持量子系统的{ \it ab initio}模拟和增强计算量子化学的价值。在这里,我们提出了一个开源的可微量子化学模拟代码,DQC,并探索自动微分促进的应用:(1)计算分子微扰特性;(2)重新优化碳氢化合物的基组;(3)检查自洽场波函数的稳定性;(4)通过炼金术微扰预测分子特性。