Keras
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
tf.keras
는 딥 러닝 모델을 빌드하고 학습시키기 위한 TensorFlow의 상위 수준 API입니다. 또한 신속한 프로토타입 제작, 최첨단 연구 및 프로덕션에 사용되며 다음과 같은 세 가지 주요 이점이 있습니다.
- 사용자 친화적
일반적인 사용 사례에 맞춰 최적화된 Keras의 인터페이스는 간단하고 일관성이 있습니다. Keras는 사용자 오류에 대해 명확하고 실행 가능한 피드백을 제공합니다.
- 모듈식 및 구성 가능
Keras 모델은 거의 제한 없이 구성 가능한 빌딩 블록을 함께 연결하는 방식으로 만들어집니다.
- 쉽게 확장 가능
연구를 위한 새로운 아이디어를 표현하는 맞춤 빌딩 블록을 작성할 수 있습니다. 새로운 레이어, 측정항목, 손실 함수를 만들고 최첨단 모델을 개발합니다.
Keras: 간략한 개요 가이드는 시작하는 데 도움이 됩니다.
tf.keras
를 사용한 머신러닝에 관한 초보자 맞춤형 소개는 이 초보자 가이드 세트를 참조하세요.
API에 관해 자세히 알아보려면 TensorFlow Keras 고급 사용자로서 알아야 할 사항을 다루는 다음 가이드 세트를 참조하세요.
Keras 내부 심층 분석을 위해 YouTube에서 다음 Inside TensorFlow를 시청하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2020-06-05(UTC)
[null,null,["최종 업데이트: 2020-06-05(UTC)"],[],[],null,["# Keras: The high-level API for TensorFlow\n\n\u003cbr /\u003e\n\nKeras is the high-level API of the TensorFlow platform. It provides an\napproachable, highly-productive interface for solving machine learning (ML)\nproblems, with a focus on modern deep learning. Keras covers every step of the\nmachine learning workflow, from data processing to hyperparameter tuning to\ndeployment. It was developed with a focus on enabling fast experimentation.\n\nWith Keras, you have full access to the scalability and cross-platform\ncapabilities of TensorFlow. You can run Keras on a TPU Pod or large clusters of\nGPUs, and you can export Keras models to run in the browser or on mobile\ndevices. You can also serve Keras models via a web API.\n\nKeras is designed to reduce cognitive load by achieving the following goals:\n\n- Offer simple, consistent interfaces.\n- Minimize the number of actions required for common use cases.\n- Provide clear, actionable error messages.\n- Follow the principle of progressive disclosure of complexity: It's easy to get started, and you can complete advanced workflows by learning as you go.\n- Help you write concise, readable code.\n\nWho should use Keras\n--------------------\n\nThe short answer is that every TensorFlow user should use the Keras APIs by\ndefault. Whether you're an engineer, a researcher, or an ML practitioner, you\nshould start with Keras.\n\nThere are a few use cases (for example, building tools on top of TensorFlow or\ndeveloping your own high-performance platform) that require the low-level\n[TensorFlow Core APIs](https://www.tensorflow.org/guide/core). But if your use\ncase doesn't fall into one\nof the\n[Core API applications](https://www.tensorflow.org/guide/core#core_api_applications),\nyou should prefer Keras.\n\nKeras API components\n--------------------\n\nThe core data structures of Keras are [layers](https://keras.io/api/layers/) and\n[models](https://keras.io/api/models/). A layer is a simple input/output\ntransformation, and a model is a directed acyclic graph (DAG) of layers.\n\n### Layers\n\nThe `tf.keras.layers.Layer` class is the fundamental abstraction in Keras. A\n`Layer` encapsulates a state (weights) and some computation (defined in the\n`tf.keras.layers.Layer.call` method).\n\nWeights created by layers can be trainable or non-trainable. Layers are\nrecursively composable: If you assign a layer instance as an attribute of\nanother layer, the outer layer will start tracking the weights created by the\ninner layer.\n\nYou can also use layers to handle data preprocessing tasks like normalization\nand text vectorization. Preprocessing layers can be included directly into a\nmodel, either during or after training, which makes the model portable.\n\n### Models\n\nA model is an object that groups layers together and that can be trained on\ndata.\n\nThe simplest type of model is the\n[`Sequential` model](https://www.tensorflow.org/guide/keras/sequential_model),\nwhich is a linear stack of layers. For more complex architectures, you can\neither use the\n[Keras functional API](https://www.tensorflow.org/guide/keras/functional_api),\nwhich lets you build arbitrary graphs of layers, or\n[use subclassing to write models from scratch](https://www.tensorflow.org/guide/keras/making_new_layers_and_models_via_subclassing).\n\nThe `tf.keras.Model` class features built-in training and evaluation methods:\n\n- `tf.keras.Model.fit`: Trains the model for a fixed number of epochs.\n- `tf.keras.Model.predict`: Generates output predictions for the input samples.\n- `tf.keras.Model.evaluate`: Returns the loss and metrics values for the model; configured via the `tf.keras.Model.compile` method.\n\nThese methods give you access to the following built-in training features:\n\n- [Callbacks](https://www.tensorflow.org/api_docs/python/tf/keras/callbacks). You can leverage built-in callbacks for early stopping, model checkpointing, and [TensorBoard](https://www.tensorflow.org/tensorboard) monitoring. You can also [implement custom callbacks](https://www.tensorflow.org/guide/keras/writing_your_own_callbacks).\n- [Distributed training](https://www.tensorflow.org/guide/keras/distributed_training). You can easily scale up your training to multiple GPUs, TPUs, or devices.\n- Step fusing. With the `steps_per_execution` argument in `tf.keras.Model.compile`, you can process multiple batches in a single `tf.function` call, which greatly improves device utilization on TPUs.\n\nFor a detailed overview of how to use `fit`, see the\n[training and evaluation guide](https://www.tensorflow.org/guide/keras/training_with_built_in_methods).\nTo learn how to customize the built-in training and evaluation loops, see\n[Customizing what happens in `fit()`](https://www.tensorflow.org/guide/keras/customizing_what_happens_in_fit).\n\n### Other APIs and tools\n\nKeras provides many other APIs and tools for deep learning, including:\n\n- [Optimizers](https://keras.io/api/optimizers/)\n- [Metrics](https://keras.io/api/metrics/)\n- [Losses](https://keras.io/api/losses/)\n- [Data loading utilities](https://keras.io/api/data_loading/)\n\nFor a full list of available APIs, see the\n[Keras API reference](https://keras.io/api/). To learn more about other Keras\nprojects and initiatives, see\n[The Keras ecosystem](https://keras.io/getting_started/ecosystem/).\n\nNext steps\n----------\n\nTo get started using Keras with TensorFlow, check out the following topics:\n\n- [The Sequential model](https://www.tensorflow.org/guide/keras/sequential_model)\n- [The Functional API](https://www.tensorflow.org/guide/keras/functional)\n- [Training \\& evaluation with the built-in methods](https://www.tensorflow.org/guide/keras/training_with_built_in_methods)\n- [Making new layers and models via subclassing](https://www.tensorflow.org/guide/keras/custom_layers_and_models)\n- [Serialization and saving](https://www.tensorflow.org/guide/keras/save_and_serialize)\n- [Working with preprocessing layers](https://www.tensorflow.org/guide/keras/preprocessing_layers)\n- [Customizing what happens in fit()](https://www.tensorflow.org/guide/keras/customizing_what_happens_in_fit)\n- [Writing a training loop from scratch](https://www.tensorflow.org/guide/keras/writing_a_training_loop_from_scratch)\n- [Working with RNNs](https://www.tensorflow.org/guide/keras/rnn)\n- [Understanding masking \\& padding](https://www.tensorflow.org/guide/keras/masking_and_padding)\n- [Writing your own callbacks](https://www.tensorflow.org/guide/keras/custom_callback)\n- [Transfer learning \\& fine-tuning](https://www.tensorflow.org/guide/keras/transfer_learning)\n- [Multi-GPU and distributed training](https://www.tensorflow.org/guide/keras/distributed_training)\n\nTo learn more about Keras, see the following topics at\n[keras.io](http://keras.io):\n\n- [About Keras](https://keras.io/about/)\n- [Introduction to Keras for Engineers](https://keras.io/getting_started/intro_to_keras_for_engineers/)\n- [Introduction to Keras for Researchers](https://keras.io/getting_started/intro_to_keras_for_researchers/)\n- [Keras API reference](https://keras.io/api/)\n- [The Keras ecosystem](https://keras.io/getting_started/ecosystem/)"]]