UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
開発・技術 · SKILL.md

keras-model-workflows

keras-model-workflows

Use this DeepCTR sub-skill for Keras-style CTR and recommender models, model selection, compile-fit-predict workflows, save/load, and tiny DeepFM smoke tests.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: keras-model-workflows description: "Use this DeepCTR sub-skill for Keras-style CTR and recommender models, model selection, compile-fit-predict workflows, save/load, and tiny DeepFM smoke tests." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Keras Model Workflows

Use this sub-skill for DeepCTR's primary tf.keras.Model-style API: choose a CTR/recommender model, build Keras feature columns, compile, fit, evaluate, predict, save/load, and smoke-test an installation.

When to use this sub-skill

  • The user asks for DeepFM, WDL, DCN, xDeepFM, AutoInt, FiBiNET, AFM, NFM, PNN, FGCNN, EDCN, or another single-output DeepCTR model.
  • The task is binary CTR classification or scalar regression with tabular sparse/dense features.
  • The user needs Keras compile, fit, predict, evaluate, save_model, load_model, custom objects, callbacks, optimizers, or embedding extraction.
  • The user wants a safe DeepCTR smoke test that does not depend on example files.

Route map

Minimal Keras CTR workflow

from deepctr.feature_column import DenseFeat, SparseFeat, get_feature_names
from deepctr.models import DeepFM

feature_columns = [
    SparseFeat("user_id", vocabulary_size=10000, embedding_dim=8),
    SparseFeat("item_id", vocabulary_size=50000, embedding_dim=8),
    DenseFeat("score", 1),
]
feature_names = get_feature_names(feature_columns)
model_input = {name: frame[name].values for name in feature_names}
model = DeepFM(feature_columns, feature_columns, task="binary")
model.compile("adam", "binary_crossentropy", metrics=["binary_crossentropy"])
model.fit(model_input, labels, batch_size=256, epochs=3, validation_split=0.2)
pred = model.predict(model_input, batch_size=256)

For feature-column construction details, route to ../data-and-feature-columns/SKILL.md.

Smoke test

From the generated skill root, run:

python sub-skills/keras-model-workflows/scripts/keras_tiny_ctr_smoke.py --task binary --save-load --json

A successful run builds a tiny DeepFM, trains one epoch on synthetic data, predicts a (n, 1) output, and optionally verifies H5 save/load with DeepCTR custom_objects.

Boundaries

保存したスキル