다음을 통해 공유


CustomMappingCatalog.StatefulCustomMapping<TSrc,TDst,TState> 메서드

정의

StatefulCustomMappingEstimator<TSrc,TDst,TState>커서당 상태를 허용하면서 입력 열의 사용자 지정 매핑을 출력 열에 적용하는 을 만듭니다.

public static Microsoft.ML.Transforms.StatefulCustomMappingEstimator<TSrc,TDst,TState> StatefulCustomMapping<TSrc,TDst,TState> (this Microsoft.ML.TransformsCatalog catalog, Action<TSrc,TDst,TState> mapAction, Action<TState> stateInitAction, string contractName) where TSrc : class, new() where TDst : class, new() where TState : class, new();
static member StatefulCustomMapping : Microsoft.ML.TransformsCatalog * Action<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> * Action<'State (requires 'State : null and 'State : (new : unit -> 'State))> * string -> Microsoft.ML.Transforms.StatefulCustomMappingEstimator<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))
<Extension()>
Public Function StatefulCustomMapping(Of TSrc As {Class, New}, TDst As {Class, New}, TState As {Class, New}) (catalog As TransformsCatalog, mapAction As Action(Of TSrc, TDst, TState), stateInitAction As Action(Of TState), contractName As String) As StatefulCustomMappingEstimator(Of TSrc, TDst, TState)

형식 매개 변수

TSrc

들어오는 데이터에서 취할 열을 정의하는 클래스입니다.

TDst

데이터에 추가되는 새 열을 정의하는 클래스입니다.

TState

커서당 상태를 설명하는 형식입니다.

매개 변수

catalog
TransformsCatalog

변환 카탈로그입니다.

mapAction
Action<TSrc,TDst,TState>

매핑 작업입니다. 입력 및 출력 개체 외에도 작업에는 보고 수정할 수 있는 상태 개체가 제공됩니다. 결과 변환기를 저장할 수 있어야 하는 경우 클래스 정의가 mapAction 구현 StatefulCustomMappingFactory<TSrc,TDst,TState> 되어야 하며 제공된 contractName것으로 데코레이팅 CustomMappingFactoryAttributeAttribute 되어야 합니다. 클래스를 포함하는 어셈블리는 클래스를 사용하여 RegisterAssembly(Assembly, Boolean)다시 로드되는 환경에 등록해야 합니다.

stateInitAction
Action<TState>

커서가 초기화되기 전에 한 번 호출되는 상태 개체를 초기화하는 작업입니다.

contractName
String

ML.NET 모델을 로드하는 데 사용되는 계약 이름입니다. 지정된 경우 null 결과 변환기는 저장할 수 없습니다.

반환

적용 대상