技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
tensorpack【数据与研究】Use Tensorpack, a TF1-compatible TensorFlow training interface with DataFlow, trainers, callbacks, prediction, checkpoints, export, and example workflow guidance.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task names Tensorpack or clearly needs its graph-mode
TensorFlow training interface, pure-Python DataFlow pipeline, callbacks,
checkpoint utilities, model export, or documented example workflow patterns.
Tensorpack is TF1-oriented: even under a TensorFlow 2 package, guide users toward
tensorpack.tfv1 / tf.compat.v1 graph code and explicit eager-mode handling.
references/repo-overview.md for the
package topology, dependency tiers, TensorFlow compatibility, and public
module map.references/repo-provenance.md before
deciding whether this skill is current for another checkout.scripts/check_tensorpack_env.py for a
safe import and optional-dependency diagnostic.references/examples-catalog.md and then
route to the owning sub-skill.references/troubleshooting.md.| User intent or signal | Read |
|---|---|
Data loading, augmentation, serializers, dataset loaders, DataFlow, QueueInput, input queue speed, MultiProcessRunnerZMQ, LMDBSerializer, imgaug | sub-skills/dataflow/SKILL.md |
Model definitions, ModelDesc, TrainConfig, trainers, callbacks, summaries, symbolic layers, multi-GPU/distributed training, training example recipes | sub-skills/training/SKILL.md |
PredictConfig, OfflinePredictor, SmartInit, checkpoint/.npz inspection, Caffe conversion, SavedModel export, compact graph export, inference example patterns | sub-skills/inference-export/SKILL.md |
| Broad example-family lookup across basics, ResNet/ImageNet, Faster/Mask R-CNN, GAN, RL, speech, NLP, Caffe, saliency/CAM, Keras | references/examples-catalog.md |
| Unknown install/import/runtime failure | references/troubleshooting.md, then the nearest sub-skill troubleshooting guide |
DataFlow, ModelDesc,
TrainConfig, SimpleTrainer, InferenceRunner, OfflinePredictor,
SmartInit, ModelExporter, argscope, LinearWrap, or Tensorpack model
layers..npz conversion, prediction, or export.tf.keras, or TensorFlow 2 eager
training with no Tensorpack dependency.Tensorpack's package dependencies include NumPy, six, termcolor, tabulate, tqdm, msgpack/msgpack-numpy, pyzmq, and psutil. TensorFlow is required for training, models, prediction, checkpoints, and export; DataFlow can be used as a pure Python data pipeline without full TensorFlow workflows. OpenCV is optional but important for image augmentation and most vision examples.
Public install patterns from the project evidence:
pip install --upgrade git+https://github.com/tensorpack/tensorpack.git
# or pin an exact Tensorpack source/release version for reproducible research
Minimal import check:
python - <<'PY'
import tensorpack
print("tensorpack", tensorpack.__version__)
from tensorpack.dataflow import FakeData, BatchData
from tensorpack import tfv1 as tf
print("tf compat", tf.__name__)
PY
For TF2 runtimes, disable eager execution before graph construction when the workflow uses Tensorpack trainers or graph APIs:
from tensorpack import tfv1 as tf
tf.disable_eager_execution()
Run the bundled environment diagnostic from the root of this skill directory or by giving its full path:
python scripts/check_tensorpack_env.py --json
python scripts/check_tensorpack_env.py --require-tf --require-cv2
It reports installed Tensorpack/TensorFlow versions, optional dependency status, and visible TensorFlow GPU devices. It does not download data, train, write outside normal stdout, or inspect original source files.
This generated skill was constructed with a CPU inspection and smoke environment. Core package imports, DataFlow construction, TensorFlow graph construction, and selected helper parser checks were verified. CUDA/multi-GPU, Horovod/BytePS, Caffe, Atari/Gym, COCO, TIMIT, and large-dataset example workflows are documented as optional or data/backend-dependent; do not claim they are verified unless the user supplies and verifies the required stack.