GradCheckResult
이 페이지에서

GradCheckResult

인터페이스, IR 분류

gradCheck가 반환하는 값입니다.

import type { GradCheckResult } from 'typeshade'

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

구문

interface GradCheckResult {
readonly ok: boolean;
readonly checked: number;
readonly worst?: { /** The parameter. */ readonly param: string; /** The index of the point in {@link GradCheckOptions.at}. */ readonly point: number; /** The component of the parameter, `0` for a scalar. */ readonly component: number; /** The component of the result, `0` for a scalar. */ readonly output: number; /** The partial derivative the derivative function gives. */ readonly derivative: number; /** The central difference. */ readonly difference: number; };
}

인스턴스 속성

ok읽기 전용 boolean

모든 편미분이 허용 오차 이내일 때 true입니다.

checked읽기 전용 number

비교한 편미분의 개수입니다.

worst선택 사항읽기 전용 { /** The parameter. */ readonly param: string; /** The index of the point in {@link GradCheckOptions.at}. */ readonly point: number; /** The component of the parameter, `0` for a scalar. */ readonly component: number; /** The component of the result, `0` for a scalar. */ readonly output: number; /** The partial derivative the derivative function gives. */ readonly derivative: number; /** The central difference. */ readonly difference: number; }

허용 오차를 기준으로 가장 멀리 벗어난 편미분입니다. 도함수와 중심 차분이 갈라지는 위치도 담깁니다. ok이면 이 값은 없습니다.

함께 보기

소스

src/core/passes/grad-check.ts, 36행, 커밋 af54ddad5 기준

이 페이지 편집 문제 보고