npx claudepluginhub aznatkoiny/zai-skills --plugin AI-ToolkitWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Comprehensive guide for Deep Learning with Keras 3 (Multi-Backend: JAX, TensorFlow, PyTorch). Use when building neural networks, CNNs for computer vision, RNNs/Transformers for NLP, time series forecasting, or generative models (VAEs, GANs). Covers model building (Sequential/Functional/Subclassing APIs), custom training loops, data augmentation, transfer learning, and production best practices.
This skill uses the workspace's default tool permissions.
references/advanced_cv.mdreferences/basics.mdreferences/best_practices.mdreferences/computer_vision.mdreferences/generative_dl.mdreferences/keras3_changes.mdreferences/keras_working.mdreferences/nlp_transformers.mdreferences/timeseries.mdscripts/quick_train.pyscripts/visualize_filters.pyDeep Learning with Keras 3
Patterns and best practices based on Deep Learning with Python, 2nd Edition by François Chollet, updated for Keras 3 (Multi-Backend).
Core Workflow
- Prepare Data: Normalize, split train/val/test, create
tf.data.Dataset - Build Model: Sequential, Functional, or Subclassing API
- Compile:
model.compile(optimizer, loss, metrics) - Train:
model.fit(data, epochs, validation_data, callbacks) - Evaluate:
model.evaluate(test_data)
Model Building APIs
Sequential - Simple stack of layers:
model = keras.Sequential([
layers.Dense(64, activation="relu"),
layers.Dense(10, activation="softmax")
])
Functional - Multi-input/output, shared layers, non-linear topologies:
inputs = keras.Input(shape=(64,))
x = layers.Dense(64, activation="relu")(inputs)
outputs = layers.Dense(10, activation="softmax")(x)
model = keras.Model(inputs=inputs, outputs=outputs)
Subclassing - Full flexibility with call() method:
class MyModel(keras.Model):
def __init__(self):
super().__init__()
self.dense1 = layers.Dense(64, activation="relu")
self.dense2 = layers.Dense(10, activation="softmax")
def call(self, inputs):
x = self.dense1(inputs)
return self.dense2(x)
Quick Reference: Loss & Optimizer Selection
| Task | Loss | Final Activation |
|---|---|---|
| Binary classification | binary_crossentropy | sigmoid |
| Multiclass (one-hot) | categorical_crossentropy | softmax |
| Multiclass (integers) | sparse_categorical_crossentropy | softmax |
| Regression | mse or mae | None |
Optimizers: rmsprop (default), adam (popular), sgd (with momentum for fine-tuning)
Domain-Specific Guides
| Topic | Reference | When to Use |
|---|---|---|
| Keras 3 Migration | keras3_changes.md | START HERE: Multi-backend setup, keras.ops, import keras |
| Fundamentals | basics.md | Overfitting, regularization, data prep, K-fold validation |
| Keras Deep Dive | keras_working.md | Custom metrics, callbacks, training loops, tf.function |
| Computer Vision | computer_vision.md | Convnets, data augmentation, transfer learning |
| Advanced CV | advanced_cv.md | Segmentation, ResNets, Xception, Grad-CAM |
| Time Series | timeseries.md | RNNs (LSTM/GRU), 1D convnets, forecasting |
| NLP & Transformers | nlp_transformers.md | Text processing, embeddings, Transformer encoder/decoder |
| Generative DL | generative_dl.md | Text generation, VAEs, GANs, style transfer |
| Best Practices | best_practices.md | KerasTuner, mixed precision, multi-GPU, TPU |
Essential Callbacks
callbacks = [
keras.callbacks.EarlyStopping(monitor="val_loss", patience=3),
keras.callbacks.ModelCheckpoint("best.keras", save_best_only=True),
keras.callbacks.TensorBoard(log_dir="./logs")
]
model.fit(..., callbacks=callbacks)
Utility Scripts
| Script | Description |
|---|---|
| quick_train.py | Reusable training template with standard callbacks and history plotting |
| visualize_filters.py | Visualize convnet filter patterns via gradient ascent |
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.