Caesar AI Atlas

Чистая функция

Caesar AI Atlas Definition

Чистая функция — это функция, выход которой зависит только от ее входов и которая не создает побочных эффектов. Она не читает и не изменяет внешнее состояние, что упрощает тестирование, параллелизацию и безопасное использование в фреймворках, таких как JAX.

Other Definitions

Чистая функция Source

A function whose outputs are based only on its inputs, and that has no side effects. Specifically, a pure function doesn't use or change any global state, such as the contents of a file or the value of a variable outside the function. Pure functions can be used to create thread-safe code, which is beneficial when sharding model code across multiple accelerator chips. JAX's function transformation methods require that the input functions are pure functions.

Related Terms