Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
tensorflow
GitHub Repository: tensorflow/docs-l10n
Path: blob/master/site/ko/datasets/cli.ipynb
25115 views
Kernel: Python 3

TFDS CLI

TFDS CLI is a command-line tool that provides various commands to easily work with TensorFlow Datasets.

Copyright 2020 The TensorFlow Datasets Authors, Licensed under the Apache License, Version 2.0

가져오기 수행 시 TF 로그 비활성화하기
%%capture %env TF_CPP_MIN_LOG_LEVEL=1 # Disable logs on TF import

설치

CLI 도구는 tensorflow-datasets (또는 tfds-nightly )와 함께 설치됩니다.

!pip install -q tfds-nightly !tfds --version

모든 CLI 명령 목록 :

!tfds --help

tfds new: 새 데이터세트 구현하기

이 명령은 기본 구현 파일이 포함 된 <dataset_name>/ 디렉터리를 생성하여 새 Python 데이터세트 작성을 시작하는 데 도움이됩니다.

용법:

!tfds new my_dataset

tfds new my_dataset는 다음을 생성합니다.

ls -1 my_dataset/

옵션 플래그 --data_format은 형식별 데이터세트 빌더(예: conll)를 생성하기 위해 사용될 수 있습니다. 데이터 형식이 지정지지 않은 경우, 표준 tfds.core.GeneratorBasedBuilder에 대한 템플릿을 생성합니다. 사용 가능한 형식별 데이터세트에 대한 자세한 내용은 문서를 확인하세요.

자세한 내용은 데이터세트 작성 가이드를 참조하세요.

사용 가능한 옵션 :

!tfds new --help

tfds build: 데이터세트 다운로드 및 준비하기

tfds build <my_dataset>를 사용하여 새 데이터세트를 생성합니다. <my_dataset>는 다음과 같을 수 있습니다.

  • dataset/ 폴더 혹은 dataset.py 파일의 경로(현재 디렉터리는 비어 있음):

    • tfds build datasets/my_dataset/

    • cd datasets/my_dataset/ &amp;&amp; tfds build

    • cd datasets/my_dataset/ &amp;&amp; tfds build my_dataset

    • cd datasets/my_dataset/ &amp;&amp; tfds build my_dataset.py

  • 등록된 데이터세트:

    • tfds build mnist

    • tfds build my_dataset --imports my_project.datasets

참고: tfds build에는 프로토타입 생성과 디버깅에 도움이 되는 유용한 플래그가 있습니다. 아래의 Debug & tests: 섹션을 참조하세요.

사용 가능한 옵션 :

!tfds build --help