텐서플로우:: 연산:: 복원

#include <io_ops.h>

체크포인트 파일에서 텐서를 복원합니다.

요약

하나 이상의 파일에 저장된 텐서를 읽습니다. 파일이 여러 개인 경우(예: 텐서가 슬라이스로 저장된 경우), file_pattern 파일 이름 부분에만 와일드카드 기호( * 및 ? )를 포함할 수 있으며, 디렉터리 부분에는 포함할 수 없습니다.

file_pattern 여러 파일과 일치하는 경우, preferred_shard 사용하여 요청된 텐서가 있을 가능성이 높은 파일을 지정할 수 있습니다. 이 연산은 먼저 일치하는 파일 목록에서 preferred_shard 인덱스에 있는 파일을 열고 해당 파일에서 텐서를 복원하려고 시도합니다. 첫 번째 파일에서 일부 텐서 또는 텐서 슬라이스를 찾을 수 없는 경우에만 모든 파일을 엽니다. preferred_shard 일치하는 Save 연산의 shard 입력으로 전달된 값과 일치하도록 설정하면 Restore 연산의 속도가 향상될 수 있습니다. 이 속성은 성능에만 영향을 미치며 정확성에는 영향을 주지 않습니다. 기본값인 -1은 파일이 순서대로 처리됨을 의미합니다.

RestoreSlice 도 참조하십시오.

논거:

  • 범위: Scope 객체
  • file_pattern: 단일 요소만 포함해야 합니다. 텐서를 읽어오는 파일의 패턴입니다.
  • tensor_name: 단일 요소만 포함해야 합니다. 복원할 텐서의 이름입니다.
  • dt: 복원할 텐서의 유형입니다.

선택적 속성( Attrs 참조):

  • preferred_shard: file_pattern 과 일치하는 파일이 여러 개인 경우 먼저 열 파일의 인덱스입니다.

보고:

생성자와 소멸자

Restore (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, DataType dt)
Restore (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, DataType dt, const Restore::Attrs & attrs)

공개 속성

operation
tensor

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 정적 함수

PreferredShard (int64 x)

구조

텐서플로우:: 연산:: 복원:: 속성

Restore에 대한 선택적 속성 설정기입니다.

공개 속성

작업

Operation operation

텐서

::tensorflow::Output tensor

공공 기능

복원하다

 Restore(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input file_pattern,
  ::tensorflow::Input tensor_name,
  DataType dt
)

복원하다

 Restore(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input file_pattern,
  ::tensorflow::Input tensor_name,
  DataType dt,
  const Restore::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

선호하는 샤드

Attrs PreferredShard(
  int64 x
)