In machine learning (ML), researchers and engineers seem to be at odds. System implementers would prefer models to be declarative, with detailed type information and semantic restrictions that allow models to be optimised, rearranged and parallelised. Yet practitioners show an overwhelming preference for dynamic, imperative languages with mutable state, and much engineering effort is spent bridging the resulting semantic divide. Is there a fundamental conflict? This article explores why imperative and functional styles are used, and how future language designs might get the best of both worlds.
翻译:在机器学习(ML ), 研究人员和工程师似乎不尽相同。 系统实施者更希望模型具有宣示性,拥有详细的类型信息和语义限制,允许模型优化、重新排列和平行化。 但实践者表现出压倒性偏爱动态的、紧迫的、具有变异状态的语言,并花费了大量的工程努力来弥补由此产生的语义鸿沟。 是否存在根本性的冲突?本文章探讨了为什么使用必要性和功能风格,以及未来语言设计如何能成为两个世界的最佳语言。