---
title: "GradCheckOptions: TypeShade 셰이더 API의 IR 분류 인터페이스 참조 문서"
description: "GradCheckOptions, TypeShade API의 IR 분류에 속하는 인터페이스입니다. gradCheck의 옵션입니다."
url: https://typeshade.dev/ko/api/gradcheckoptions/
language: ko
---

# `GradCheckOptions`

인터페이스, IR 분류

gradCheck의 옵션입니다.

`import type { GradCheckOptions } from 'typeshade'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
interface GradCheckOptions {
  readonly wrt: string | readonly string[];
  readonly at: readonly (readonly unknown[])[];
  readonly mode?: 'forward' | 'reverse';
  readonly custom?: Readonly<Record<string, string>>;
  readonly h?: number;
  readonly tolerance?: number;
}
```

## 인스턴스 속성

**`wrt` 읽기 전용 `string | readonly string[]`**

도함수를 검사할 대상 매개변수입니다. 이름 하나 또는 이름의 목록입니다. 각 매개변수는 `f32` 또는 `f32` 벡터입니다. 역방향 모드에서는 `f32` 행렬도 허용됩니다.

**`at` 읽기 전용 `readonly (readonly unknown[])[]`**

검사할 점들입니다. 각 점은 함수를 한 번 호출할 때의 인자 목록이며, 인자는 함수의 매개변수 순서대로 적습니다. 벡터나 행렬은 숫자의 배열로 적습니다.

**`mode` 선택 사항 읽기 전용 `'forward' | 'reverse'`**

검사할 도함수의 모드입니다. 기본값은 `'forward'`입니다.

**`custom` 선택 사항 읽기 전용 `Readonly<Record<string, string>>`**

역방향 모드에서 검사에 그대로 쓸 작성자가 제공한 어드조인트입니다. [`grad`](https://typeshade.dev/ko/api/grad/) 옵션의 `custom`과 같은 방식으로 지정합니다.

**`h` 선택 사항 읽기 전용 `number`**

중심 차분의 간격입니다. 기본값은 `1e-5`입니다.

**`tolerance` 선택 사항 읽기 전용 `number`**

상대 허용 오차입니다. 편미분은 중심 차분과의 차이가 `tolerance * max(1, |difference|)` 이내이면 통과합니다. 기본값은 `1e-4`입니다.

## 함께 보기

- [`gradCheck`](https://typeshade.dev/ko/api/gradcheck/)
- [`grad`](https://typeshade.dev/ko/api/grad/)

## 소스

[`src/core/passes/grad-check.ts`, 15행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/grad-check.ts#L15), 커밋 af54ddad5 기준
