网页 综合 更新时间 2026-11-14 05:30:39

KerasHub

自动蜘蛛 keras.io 正文约 1778 字
KerasHub
KerasHub is a pretrained modeling library that aims to be simple, flexible, and fast. The library provides Keras 3 implementations of popular model architectures, paired with a collection of pretrained checkpoints available on Kaggle Models. Models can be used for both training and inference, on any of the TensorFlow, Jax, and Torch backends.
KerasHub is an extension of the core Keras API; KerasHub components are provided as keras.layers.Layer and keras.Model implementations. If you are familiar with Keras, congratulations! You already understand most of KerasHub.
To install the latest KerasHub release with Keras 3, simply run:
To install the latest nightly changes for both KerasHub and Keras, you can use our nightly package.
Currently, installing KerasHub will always pull in TensorFlow for use of the tf.data API for preprocessing. When pre-processing with tf.data, training can still happen on any backend.
Visit the core Keras getting started page for more information on installing Keras 3, accelerator support, and compatibility with different frameworks.
Import KerasHub and other libraries:
Load a resnet model and use it to predict a label for an image:
Load a Bert model and fine-tune it on IMDb movie reviews:
We follow Semantic Versioning, and plan to provide backwards compatibility guarantees both for code and saved models built with our components. While we continue with pre-release 0.y.z development, we may break compatibility at any time and APIs should not be consider stable.
KerasHub provides access to pre-trained models via the keras_hub.models API. These pre-trained models are provided on an "as is" basis, without warranties or conditions of any kind.
If KerasHub helps your research, we appreciate your citations. Here is the BibTeX entry:
访问原文 返回搜索 https://keras.io/keras_hub/
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。