计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
inference-export【效率与协作】Use Tensorpack PredictConfig, OfflinePredictor, SmartInit, checkpoints, model export, and model-conversion workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Root skill id: tensorpack.
This sub-skill covers Tensorpack inference, checkpoint inspection, export, and optional model-conversion flows. Use it when a task is about turning trained weights into a predictor, a SavedModel, a compact graph, or a clean inference graph.
PredictConfig, OfflinePredictor, OnlinePredictor, and FeedfreePredictor.SmartInit, SaverRestore, DictRestore, and checkpoint / .npz loading.ModelExporter.export_serving() and ModelExporter.export_compact().tensorpack.utils.loadcaffe and Caffe-to-npz conversion flows.../training/SKILL.md.../dataflow/SKILL.md.TowerContext(..., is_training=False).tf.identity(..., name='...') or by using the exact tensor names produced by the tower.OfflinePredictor for the common numpy-array path.OnlinePredictor only when you already own a live session and tensor handles.FeedfreePredictor only when the inputs come from an InputSource.ModelExporter.export_serving() for SavedModel and export_compact() for a frozen/pruned .pb.PredictConfig is the configuration hub. It can be built from a ModelDesc, a plain tower_func plus input_signature, or a TowerFunc wrapper.OfflinePredictor builds a fresh graph and session from that config, then accepts numpy inputs and returns numpy outputs.OnlinePredictor is a thin wrapper around an existing session plus explicit tensors.FeedfreePredictor consumes an InputSource instead of feeds and is useful when the input is already staged, queued, or dataflow-driven..npz, or dict: see Checkpoint guide..npz: run scripts/inspect_checkpoint.py.scripts/export_model_demo.py.The bundled references cover these source-evidence patterns without requiring the original example checkout:
.npz, preprocess images, and load with SmartInit..npz weights, run ImageNet-style prediction, and optionally evaluate when the user supplies data.If a request mixes inference with any of the above, keep the prediction or export pieces here and route the rest to the adjacent sub-skills.